Questions tagged [boost-graph]

Boost.Graph is a C++ library containing generic graph components and algorithms.

Boost.Graph is a C++ library containing generic graph components and algorithms.

680 questions
0
votes
1 answer

How to access the ancestor vertex during a breadth-first search with the Boost Graph Library?

I'm trying to write my own version of connected components discovery using the breadth-first search algorithm included in the Boost Graph Library and I need to access the ancestor (the vertex which leads to the discovery of the current vertex) …
fokenrute
  • 739
  • 6
  • 17
0
votes
0 answers

"A heap has been corrupted" when using boost::boykov_kolmogorov_max_flow

I am trying to use the Boost implementation of Boykov-Kolmogorov max-flow algorithm. Here is how I do it: typedef boost::adjacency_list
Sunreef
  • 4,452
  • 21
  • 33
0
votes
0 answers

Boost.Graph with Bellman-Ford: Invalid read

I am using the Boost.Graph library to find the shortest path in a graph with the Bellman-Ford algorithm. However, my program gets killed in execution. I have prepared a snippet of my code: typedef boost::property
Bobface
  • 2,782
  • 4
  • 24
  • 61
0
votes
1 answer

Using Boost.Graph to solve longest path

I am trying to find a way to solve the longest path problem for a graph with the following characteristics: Directed Weighted (including negative weights) NOT acyclic, although I am only looking for simple paths. I have had a look at Boost.Graph…
Bobface
  • 2,782
  • 4
  • 24
  • 61
0
votes
1 answer

Why does the Boost Graph Library invalidate all iterators when removing a vertex?

In the Boost Graph Library documentation it says that when you remove a vertex from a graph (when its vertices are stored in a vector at least), all iterators (and descriptors) are invalidated. This surprised me, as it seems not be semantically…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
0
votes
1 answer

How to copy boost::property_map?

I would like to obtain two sets of shortest paths (one-to-all) derived from one graph, defined as adjacency_list with internal properties (as opposed to bundles) In theory I could run dijkstra_shortest_paths on two reference nodes, n1 and n2. If I…
rytis
  • 648
  • 5
  • 10
0
votes
0 answers

Forming reference to void when getting property map from a bundled property

My Graph type is defined as follows: using Graph = boost::adjacency_list; where CostType happens to be int. I am trying to obtain the Kamada-Kawai spring layout as follows: template PointMap…
AlwaysLearning
  • 7,257
  • 4
  • 33
  • 68
0
votes
0 answers

How to combine/merge multiple graphs using LEMON (or BGL)

I am looking for a way to merge multiple Graphs into a single Graph using LEMON. If it can not be done, I'd also be interested in solutions using Boost Graph Library. The background is, that I want to define smaller structural units as graphs,…
Slizzered
  • 869
  • 2
  • 9
  • 23
0
votes
0 answers

Boost-graph: Unclear Exception in Implementation of Dijkstra's algorithm

I am trying to implement a directed graph in order to compute the shortest path by means of Dijkstra's algorithm. In order to do this I look at the example provided by the boost website and try to apply what is done in the example. The graph that I…
Jordi Ozir
  • 109
  • 4
0
votes
0 answers

Representing a type hierarchy with Boost Graph Library (BGL)

I'm new to the BGL. I'm trying to represent a type hierarchy along these lines: Number : terminal(double) String : terminal(std::string) Vec2 x : Number y : Number Circle position : Vec2 radius : Number I'm using the following…
pt3dNyc
  • 369
  • 1
  • 16
0
votes
1 answer

Why are the arguments to BGL functions separated by dots, instead of commas?

I am reading someone's codes. This is a function from boost graph library. This is the original function definition. void dijkstra_shortest_paths (const Graph& g, typename graph_traits::vertex_descriptor s, …
daydayup
  • 2,049
  • 5
  • 22
  • 47
0
votes
1 answer

Implementing BoostGraph VF2 subgraph_iso with List Container

I have tried to implement the Boost VF2 Subgraph Iso algorithm with my vertex/edge container being a list, but it isn't working. Here's an example of it working, but with the containers being vectors. #include #include…
Paradox
  • 1,935
  • 1
  • 18
  • 31
0
votes
1 answer

How does boost::adjacency_list keep valid edge descriptors after remove_edge

I'm trying to understand roughly how boost's adjacency_list works, and don't understand how edge descriptors can remain valid after remove_edge is called when using an EdgeList of std::vector. As far as I understand it, both vertex and edge…
zennehoy
  • 6,405
  • 28
  • 55
0
votes
1 answer

Boost Graph Library: Error while compiling with make_reverse_graph

I get a lot of errors when compiling while using the function make_reverse_graph of the Boost Graph Library.
thi gg
  • 1,969
  • 2
  • 22
  • 47
0
votes
1 answer

minimum degree ordering using boost graph library

I have run the code of minimum degree ordering of boost graph library using the Harwell-boeing formatted matrix (bcsstk01.rsa) as input which is given in the documentation of the code, it also says how to run the code. But when I tried to run…