Boost logo

Boost Users :

Subject: [Boost-users] predicate for bundled properties in filtered graph
From: giridhar (giridharms_at_[hidden])
Date: 2011-11-17 13:39:28


Hello All,

     I am getting little confused in defining the predicate for filtered
graph since my properties are bundled. I need to compare two bundled
property inside the predicate, I am not getting any idea of how to access
this property there.

Bundled property is declared as:

struct Edgep
{
int edge_index;
int edge_w;
 std::string edge_name;
int capacity;
int residual_capcity;
 int bandwidth_used;
};

typedef subgraph< adjacency_list<vecS, vecS, undirectedS,
   Vertexp, property< edge_index_t, unsigned int, Edgep > > > Graph;

I am creating the edge bundled property map as typedef
bundle_property_map<Graph, Graph::edge_descriptor, Edgep, int> EM;

I need to filter those edges whose bandwidth_used < residual_capacity.

 According to my understanding, I need to create a map to bandwidth_used
and residual_capacity and pass this to predicate function. But can I
define a predicate to take 2 different input maps or what is the better way
to do this? I need some help at this part.

Your suggestions would be of great help for me to proceed.

-- 
Regards,
Giridhar


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net