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 serialize boost graph, can somebody give me an example?

I know boost serialization can do this, but I cannot find an example. Can somebody give me an example? Additionally, I have an array which contains boost graph. Do I have to do some special works to do that?
0
votes
1 answer

Clustering on Graph (using Boost Graph Library)

In a C++ project, we are trying on an important Boost Graph traffic-related to launch several simulations of Dijkstra for the shortest path between two nodes. The graph has 18 000 vertices and 40 000 edges. Loading the graph takes roughly 200ms,…
Emmanuel Jay
  • 484
  • 3
  • 10
0
votes
1 answer

In BGL, how to efficiently find an adjacent vertex using a property of a vertex

I’m having a bidirectional graph (i.e. a directed graph in which it is possible to iterate both the in-edges and the out-edges). Each vertex, among other internal properties, has a special ID property which is an integer from a finite set (couple of…
Andrey
  • 23
  • 2
0
votes
0 answers

Storing vertex_descriptors in bundled properties

I am working on a project where, I first need to create a certain directed graph structures using BGL, my question is that if I never delete a vertex after adding it to graph then would there be an issue to store the vertex_descriptors in bundled…
Jim
  • 45
  • 5
0
votes
1 answer

How to use arrays in Boost graph library bundled properties ?

I have a question on using arrays in the bundled properties in the boost graph library. The below I tried and ended up in comilation error. Below is my graph declaration. struct PT_EdgeProperties{ PT_EdgeId edge_id; double…
0
votes
0 answers

Find the graph given an edge_iter

I'm trying to make a function where I give a graph, an edge, and another graph as parameters. bool gUe(Graph& g, edge_iter ep, Graph t) { vertex_t from = source(*ep, t); vertex_t to = target(*ep, t); Graph::edge_descriptor copied_edge…
0
votes
1 answer

Custom graph distance in Boost dijkstra_shortest_paths

I know other people have asked similar questions but this one is slightly different. I need to calculate distance as a combination of weight and number of nodes away from root. So if the graph is A->20 ft->B->10 ft->C then normally you would…
Mike Manh
  • 333
  • 2
  • 11
0
votes
1 answer

Breadth first search from multiple sources using Boost Graph Library

I want to be able to use bfs in BGL to find all the trees of a forest, which is basically finding connected components using multiple source vertices. For example, it may be used to find different connected regions of an image to enable image…
0
votes
1 answer

How to Find All possible paths between 2 vertices

I am debugging a legacy code where a road network has been represented by Boost Graph. The A_Star search doesn't give me the shortest path between 2 certain points and I know boost can't be wrong (not until I have debugged my code a thousand…
rahman
  • 4,820
  • 16
  • 52
  • 86
0
votes
2 answers

Boost:Graph recursive traverse and graph-copy

I had some first experience with creating and traversing graphs. But now I have a problem, of which I don't now, if boost::graph has some algorithms to solve it. Here is my graph-definition: const int _AND = 1001; const int _OR = 1002; const…
Mike75
  • 504
  • 3
  • 18
0
votes
1 answer

Propagate values within a connected component using BFSVisitor? (Boost, C++)?

I am constructing a boost graph. For every connected component in the graph, I would like to propagate a unique ID value for every vertex in that connected component. I am wondering if there is a way to do this using Boost's BFSVisitor Concept? I…
mskb
  • 341
  • 3
  • 12
0
votes
1 answer

On C++ Boost Graph Creation With Bundled Properties

I am trying to set up a Boost Graph of vertices with bundled properties. Unfortunately, the "add_edge" step doesn't seem to work resulting in the following error. Any insights would be helpful! error: constructor for…
mskb
  • 341
  • 3
  • 12
0
votes
3 answers

Advice on data-structure for represeting a Path in system

I have a system where i need to represent something similar as Path, a path just provides a route to reach a particular node. There can be multiple Path that can be used to reach same node. I am currently representing a Path using vector of Nodes,…
Blackhole
  • 273
  • 2
  • 12
0
votes
0 answers

intel compiler error: no instance of overloaded function boost::put()

I am using an intel compiler 13.0.1 and with boost 1.52 i get the following error when I use boost::get() and boost::put() I use a boost::adjacency_list<> for my graph type. Properties are assigned to vertices. The get() and put() functions help…
Pogo
  • 475
  • 3
  • 19
0
votes
2 answers

Create undirected graph by boost graph same as the input

I want to create the graph as following, first column is vertex, other's are adjacency vertex 1 2 3 4 7 2 1 3 4 3 1 2 4 4 1 2 3 5 5 4 6 7 8 6 5 7 8 7 1 5 6 8 8 5 6 7 I add the edges into the graph like this using MinCutG =…
StereoMatching
  • 4,971
  • 6
  • 38
  • 70