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

Infinite loop when copying a class containing a BGL graph

I have a struct (State is a pure virtual abstract class) : using GraphColorGraph = boost::adjacency_list
0
votes
2 answers

How to get shortest path between 2 nodes only, given adjacency list directed graph?

I have a Graph Represented With Following Code : typedef adjacency_list < vecS, vecS, directedS, property < vertex_name_t, idType >, property < edge_weight_t, double > > graph_t; I Have two Questions : how to feed My Graph into Dijkstra Algorithm…
Bilal
  • 3,191
  • 4
  • 21
  • 49
0
votes
0 answers

How to get vertex from boost graph in constant time?

I'm trying to create a graph where lanes represent vertices and edges connections between. The idea is to later on use a_star algorithm to traverse the graph and find the best route. My question is how can I get vertex (descriptor?) by using just…
Daniel
  • 980
  • 9
  • 20
0
votes
1 answer

Boost.Graph - having 2 simple classes and one class - datatype how to create a graph?

So I have some simple generator class that is much alike this a datatype like this (pointer and length) and a simple costume datatype renderer like this. How to create a graph that would help me pass generated data into my renderer? Currently I do…
Rella
  • 65,003
  • 109
  • 363
  • 636
0
votes
0 answers

Getting illegal indirection error while initializing boost graph with vector

I am trying to initialize a graph in boost. But I am getting an error I'm not able to understand. typedef typename boost::adjacency_list < boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::property<…
rafee
  • 1,731
  • 18
  • 21
0
votes
1 answer

How to use the output of Polygon_mesh_slicer to control points in Surface_mesh_deformation CGAL?

I'm working on a mesh processing project that requires identifying points that are intersected by a plane and then deforming the mesh using those points. I am using CGAL::Polygon_mesh_slicer<> to find the points of interest and want to use those…
0
votes
1 answer

BGL: specialization of template in different namespace

I am creating a graph by BGL, and would like to combine bundled properties with vertex_index_t as the VertexProperty of the graph is listS. I used the method from BGL dijkstra_shortest_path algorithm method does not accept my color map exterior…
chenwj
  • 1,989
  • 2
  • 16
  • 30
0
votes
0 answers

Boost Graph Lib add tree vertex during algorithm

I would like to create an algorithm with Boost Graph Library that expands a branch on a tree graph "on the fly" while the algorithm is running. Depending on some conditions the algorithm would explore branches with lower costs. These costs should…
evolved
  • 1,850
  • 19
  • 40
0
votes
1 answer

Error in BGL documentation?

In the documentation of the algorithm isomorphism of the Boost Graph Library, it is stated that the named parameter vertex_invariant1 and vertex_invariant2 take a binary function as argument. However, the default value for these parameters is…
Greg
  • 6,038
  • 4
  • 22
  • 37
0
votes
1 answer

Using make_bfs_visitor instead of derived visitor with BFS in boost BGL

I've (successfully) implemented a custom visitor for my BFS: (See also: Find all reachable vertices in a Boost BGL graph using BFS) ... ... ListVisitor vis; boost::breadth_first_visit(mListGraph, start, Q, vis, colormap); Visitor defined in my…
fhw72
  • 1,066
  • 1
  • 11
  • 19
0
votes
0 answers

boost::graph metric_tsp_approx with bundled properties fails at runtime

I am trying to run the metric_tsp_approx algorithm from boost BGL to solve a simple Traveling Salesman Problem (here the documentation and the related example). I use bundled properties to create my graph. The code compiles fine, but at runtime,…
0
votes
0 answers

Exporting a graph as a graphml file in an R package using boost graph with plotting capabilities

I developed a C++ program using boost-graph which stores the output as graphml files. This uses the compiled part of the boost graph library. I wanted to include this code in an R package using Rcpp, so I used BH, however the graphml writer is not…
0
votes
1 answer

Boost C++ - generating a layout

I've been recently dealing with graph drawing with C++. My question is, how can I fix the final error: required from here /usr/include/boost/graph/random_layout.hpp:30:8: error: ‘const class boost::random::linear_congruential_engine
sdgaw erzswer
  • 2,182
  • 2
  • 26
  • 45
0
votes
1 answer

Need to find sub graphs from one big graph using boost::graph

PH -> PH1 PH -> PH2 PH1 -> N1 PH1 -> N2 PH2 -> N3 PH2 -> N4 required output as : sub graph 1 : PH1 -> N1 PH1 -> N2 sub graph 2 : PH2 -> N3 PH2 -> N3
0
votes
1 answer

Recording predecessors in a DFS search in an undirected graph

I was trying to use the code from this thread: Boost DFS back_edge, to record the cycles in an undirected graph. To do this I need to store the predecessors for each dfs tree when it finds a back_edge. Since this is an undirected graph I think we…
Bruce
  • 415
  • 2
  • 19