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
4
votes
1 answer

Boost::graph Dijkstra : initially populating the queue

I'm using boost::graph and its Dijkstra implementation. I want to compute THE shortest path from a set of vertices to another set of vertices. I do not want to compute all the possible paths between those sets. The idea is the following : I'm in a…
Tristram Gräbener
  • 9,601
  • 3
  • 34
  • 50
4
votes
1 answer

How can I use the C++ Boost Graph Library (BGL) to find isomorphic graphs?

Using C++ Boost Graph Library (BGL) to Find Isomorphic Graphs See graphs. I want to get the graphs which are isomorphic (respecting the type - A/B). Of course, all graphs which have not the same number of connections, are sorted out in the…
michael
  • 43
  • 3
4
votes
1 answer

Should I use boost::property_map?

(Apologies for the title, I couldn't come up with a good one shorter than 140 characters...) I'm writing a graph algorithm for the boost::graph library. Within my algorithm, I need to keep variables, weights and counters, about the nodes. The…
carlpett
  • 12,203
  • 5
  • 48
  • 82
4
votes
1 answer

How can I use `ListS` instead of `VecS` as underlying container and be able to do the same thing?

I usually work with vecS as container for boost::adjacency_list: struct myVertexType { std::vector vec; /* and more */ }; struct myEdgeType { /* some data too */ }; using Graph = boost::adjacency_list< boost::vecS, …
kebs
  • 6,387
  • 4
  • 41
  • 70
4
votes
2 answers

range view as data member

I'm trying out the new range-v3 library (0.5.0, clang-7.1) I'm traversing through a graph (bfs). Each node in the graph contains some vector data (std::vector). While traversing through the graph, I'm trying to create a concat_view (which is…
Surya
  • 1,139
  • 1
  • 11
  • 30
4
votes
1 answer

How to get port identifiers for an edge using Boost Graph Library?

Using the Boost Graph Library, is it possible to get the port identifiers for an edge? Example: After calling read_graphviz, I can iterate through the edges of this graph and print their node_ids -- I get "A -> B, A -> B". How can I print something…
jlstrecker
  • 4,953
  • 3
  • 46
  • 60
4
votes
1 answer

How to load a TIFF image like a graph in C++ BOOST

I want do load a tiff image (GEOTIFF with pixels with float values) like graph in boost C++ (i'm a newbie in C++). My goal is use the bidirectional Dijkstra from source A to target B to get more performance. Boost:GIL load tiif images: std::string…
4
votes
2 answers

Can I implement potential field/depth first method for obstacle avoidance using boost graph?

I implemented an obstacle avoidance algorithm in Matlab which assigns every node in a graph a potential and tries to descend this potential (the goal of the pathplanning is in the global minimum). Now there might appear local minima, so the (global)…
Philipp
  • 11,549
  • 8
  • 66
  • 126
4
votes
1 answer

How does boost::copy_graph's vertex_copy work?

I am using boost::copy_graph to copy an adjacency_list into another adjacency_list with a different VertexProperties template. To do this, I am trying to use the vertex_copy parameter (doc here). I am running into a compiler error that tells the I…
Logan Byers
  • 1,454
  • 12
  • 19
4
votes
1 answer

Accessing BGL GraphProperty

I am trying to access the graph label for a dot(graphviz) formatted input file using the Boost Graph Library. Below is the typedef for the graph type: struct DotVertex { std::string label; }; struct DotEdge { std::string label; }; struct…
yaman
  • 759
  • 3
  • 17
4
votes
1 answer

Boost Graph Library: How to use depth_first_visit, issue with ColorMap

Initial question: Boost Graph Library: Prevent DFS from visiting unconnected nodes I am trying to use boost::depth_first_visit, but don't know how to supply the ColorMap property. I tried the method given in the example here:…
user4979733
  • 3,181
  • 4
  • 26
  • 41
4
votes
1 answer

Can not link Boost Graph Library for read_graphviz() example

I am trying to do an example with read_graphviz but I can not help the linker to link the read_graphviz function call to the correct version read_graphviz. At http://www.boost.org/doc/libs/1_61_0/libs/graph/doc/read_graphviz.html there are three…
Angelos
  • 533
  • 6
  • 19
4
votes
1 answer

Last item of vector not displaying/vector indexing issue

I have a weird bug that I simply cannot find. I am building an adjacency_list graph using the Boost Graph Library, and am populating a list of vertices into a vector. When I iterate through the vector, it will print out all of the vertices…
badfilms
  • 4,317
  • 1
  • 18
  • 31
4
votes
1 answer

Algorithm for the Planarization of a non-planar Graph

Is there a popular algorithm for the planarization of a non-planar graph. I'm currently planning to implement a Orthogonal Planar Layout algorithm for undirected graphs in Boost ( Boost Graph Library ). BGL has an implementation to check the…
Ganesh
  • 350
  • 3
  • 8
4
votes
1 answer

Weight map as function in Boost Graph Dijkstra algorithm

I'm using Boost Graph Libraries and need to use a weightmap which is not constant, but which is a function of a parameter K (i.e. the edge costs depend on K). In practice, given the following code: #include #include…
user1403546
  • 1,680
  • 4
  • 22
  • 43