Questions tagged [boost-property-map]

32 questions
2
votes
1 answer

write_graphviz does not work when vertex list is setS?

The following code has errors: cannot bind ‘std::basic_ostream’ lvalue to ‘std::basic_ostream&& #include void foo(int,char*[]) { using namespace boost; typedef boost::adjacency_list< boost::setS, // outedge…
Joe C
  • 2,757
  • 2
  • 26
  • 46
2
votes
1 answer

Overloading streaming operators for a Boost Graph bundle output for GraphViz

Is it possible to use bundled properties in the Boost Graph Library, with a standard library type, while also using that type's overload of the << stream operator to satisfy write_graphviz? #include namespace boost { …
user2023370
  • 10,488
  • 6
  • 50
  • 83
1
vote
1 answer

How to write GraphML file to Boost Graph with custom graph_bundle Property?

I am not able to compile below , where I want to use graph_bundle property of boost graph. struct VertexProps { std::string VertexName; }; struct EdgeProps { std::string edgeName; }; struct GraphProps { std::string…
1
vote
1 answer

How to interpret complex strings as graph properties when reading a graphML file using `boost::read_graphml`?

I have a graph type where each Vertex carries a std::vector as a property. struct VertexProperties { std::vector numbers; }; using Graph = boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, VertexProperties>; I…
Quappas
  • 79
  • 7
1
vote
1 answer

How to create a boost property map between rdkit molecular bond graph edges and BGL biconnected component identifiers?

The rdkit library provides a molecule class ROMol that provides a member function getTopology that returns a BGL graph of type adjacency_list. I understand that the rdkit type Bond defines the edge properties…
Quappas
  • 79
  • 7
1
vote
1 answer

Boost::Graph-algorithm does not write data with PropertyMap (kamada_kawai_spring_layout, bundled properties)

I have a an adjacency_list graph with randomly connected nodes using Erdos-Renyi edge generation. The graph uses bundled properties by defining data structures both for the vertices (Graph_Node) and edges (Graph_Edge), which is used to assign the…
Jonas Hjulstad
  • 395
  • 1
  • 8
1
vote
1 answer

Time complexity/performance of edge and vertex properties in Boost Graph

Consider: typedef adjacency_list< listS, //out edges stored as std::list listS, //verteices stored as std::list directedS, property, property > user_graph; Storage of edges and…
Tryer
  • 3,580
  • 1
  • 26
  • 49
1
vote
1 answer

What is required for a custom BGL graph to work with topological sort?

I've created a custom BGL graph model, like in this answer: What is needed to use BGL algorithms on existing data structures ( edges and vertices as vector)?. It adapts a custom data structure for use with some Boost.Graph algorithms. The…
1
vote
1 answer

Iterating through edges with custom defined edge properties of boost::adjacency_list

I'm working on a simulation program which uses boost::adjacency_list to represent a graph. The edges have costume designed properties struct edge_data{ const float linear_cost, const_cost; std::queue<*Agent> agents; edge_data(float lin,…
yanother
  • 95
  • 1
  • 4
1
vote
1 answer

Weights in a labeled_graph

How do I add weights to this labeled graph that uses add_edge_by_label for use in dijkstra_shortest_paths? Am trying to use an example Thanks #include #include #include…
Tims
  • 627
  • 7
  • 19
1
vote
0 answers

Connected components or inverse search with the Boost Graph Library

Is it possible to run connected_components() against a bidirectional graph (constructed with ::boost::bidirectionalS) in the BGL? I get a segmentation violation when running something like this with a graph constructed that way: int num_comp =…
Gary Jackson
  • 565
  • 4
  • 18
1
vote
1 answer

BGL - using flow algorithms with bundled properties

I cannot seem to figure out how to get BGL's push-relabel max flow algorithm to work with bundled properties. Setting up the graph like this: struct VertexProperties{ }; struct EdgeProperties{ int id; int capacity; int…
User1291
  • 7,664
  • 8
  • 51
  • 108
1
vote
1 answer

boost DFS does not work with setS vertice lists

The following code is not compiled. #include #include #include typedef boost::adjacency_list< boost::setS, // outedge list boost::setS,…
Joe C
  • 2,757
  • 2
  • 26
  • 46
1
vote
1 answer

dijkstra_shortest_paths Boost Graph Lib 1.57.0 fails

I am using BGL and have recently migrated to 1.57.0 from 1.46.1. I also switched from using Xcode on a mac to gcc 4.9.2. I am getting a no matching function call to get and have created this small snipet of code to illustrate the problem. If I…
FlyBoy777
  • 13
  • 2
1
vote
1 answer

Boost's property_map test whether a key exists?

In the context of BGL, I need to iterate the in_edges and out_edges but I want to exclude those that are part of the reverse edges i.e. exclude those that are part of the reverse edges property_map. The code below shows what I would like to do but…
SkyWalker
  • 13,729
  • 18
  • 91
  • 187