How to create a C++ Boost undirected graph and traverse it in depth first search (DFS) order?
How to create a C++ Boost undirected graph and traverse it in depth first search (DFS) order? ...
How to create a C++ Boost undirected graph and traverse it in depth first search (DFS) order? ...
Anybody out there using BGL for large production servers? How many node does your network consist of? How do you handle community detection Does BGL have any cool ways to detect communities? Sometimes two communities might be linked together by one or two edges, but these edges are not reliable and can fade away. Sometimes there ...
I'm using an adjacency_list graph, with undirected and unweighted edges. I need to find a shortest path between vertex u and vertex v. Should I use breadth_first_search() starting from u? When reaching v, how do I obtain the path, and how do I stop the search? thanks! ...
Hi I am working on a directed graph (actually a bidirectional one) with Boost.Graph. I'd like to use the layout algorithms that exist (either Kamada-Kawai or Fruchterman-Reingold) but they only accept undirected graphs as parameters. What is the simplest way to use these layout algorithms ? More generally, what's the right way to lure ...
I seem to recall reading about a way to 'reduce' the size of template spew in compiler errors associated with the boost libraries. My recollection is that it gives the template parameters nicer names than the compiler default naming (which is quite horrid). Is this real, or did I dream about it? I've been trying to find where I read thi...
I am trying to do image segmentation by bottom-up hierarchical clustering, in order to obtain R regions. Starting with assumption that each pixel is a region, at each iteration two the most similar spatially adjacent regions must be merged together. The image can be of order 500 x 500, leading to a large number of initial regions. I try...
If my BGL graph contain edge from node x to node y, and I want to change the target of this edge, so that now it's pointing from x to z, how it can be done? Are there any functions in BGL for that? ...
I have a class (in C++), call it Data, that has thousands of instances (objects) when the code is run. I have a widget (in Qt), call it DataWidget that displays attributes of the objects. To rapidly build the widget I simply wrote the object attributes to a file and had the widget parse the file for the attributes - this approach works, ...
Hi, Dear all, I am working on Partially Directed Graph (PDAG). For direction i am using weight property. Now i want to find is there any path between given two nodes A and C ? Can any one guide me how i can do this using BOOST Graph libraries. I find transitive_closure property but please guide me how i can tackle this method using ...
I have a Graph type which satisfies concepts: boost::function_requires<boost::GraphConcept<Graph> >(); boost::function_requires<boost::IncidenceGraphConcept<Graph> >(); boost::function_requires<boost::BidirectionalGraphConcept<Graph> >(); boost::function_requires<boost::VertexListGraphConcept<Graph> >(); boost::function_requires<boost::...
I'm writing a library for manipulating bond graphs, and I'm using the Boost Graph Library to store the data for me. Unfortunately, I can't seem to figure out how to implement a proper visitor pattern using it, as you can't subclass out vertices - you must rely on 'properties' instead. The visitor framework provided in the library seems...
Hi, I'm using adjacency_list< vecS, vecS, bidirectionalS ... > extensively. I have so many graphs loaded at once that memory becomes an issue. I'm doing static program analysis and store the callgraph and flowgraphs of the disassembled binary in boost graphs. Thus I can have several ten thousand functions==flowgraphs and one gigantic ca...
I'm trying to decide between going with a pre-made graph/node network library or to roll my own. I'm implementing some graph search algorithms which might require some significant customization to the class structure of the node and/or edges. The reason I'm not sure what to do is that I'm unsure if customization of a pre-made might be...
How should I modify the bundled properties of a vertex from inside a visitor? I would like to use the simple method of sub-scripting the graph, but the graph parameter passed into the visitor is const, so compiler disallows changes. I can store a reference to the graph in the visitor, but this seems weird. /** A visitor which ident...
I need to search through a DAG graph, but I don't want to advance past a node before I have seen all of the other nodes that have directed links pointing to it. Is there an existing algorithm to handle this particular situation, the depth first search and breath first search don't work for this order of traversal. Ie: A -> B B -> C C ...
I am working on a software where i have to create a graph (using boost::adjacency_list). The incremental insertion of vertices takes an extremely long time. Until now, i hadn't worked on the issue, because the use of STLport made this problem go away. I have now migrated my work to Visual Studio 2008, but can't take the time to go on us...
I am investigating the use of the boost graph libraries in order to apply them to various network problems I have in mind. In the examples I have been looking at the graph edge values ("weights") are always initialized as integers, such as in these Bellman-Ford and Kruskal algorithms eg: int weights[] = { 1, 1, 2, 7, 3, 1, 1, 1 }; My ...
I'm rusty on C++ templates and I'm using the boost graph library (a fatal combination). I've searched the web and can't find any direct instructions on how to take a custom graph structure and fit enough of it to BGL (boost graph library) that I can use boosts graph traversing algorithms. Anyone familiar enough with the library to help m...
I use Boost Graph Library in a project and it is declared as: typedef adjacency_list <listS, listS, undirectedS, TrackInformation, LinkInformation> TracksConnectionGraph; Things are going fine until I have to call connected_components on my graph. typedef std::map<TracksConnectionGraph::vertex_descriptor, TracksConnectionGraph::vert...
I have a Boost Graph with VertexList=vecS. typedef adjacency_list <listS, vecS, undirectedS, TrackInformation, LinkInformation> TracksConnectionGraph; Now I want to iterate through my vertices and remove those that have a specific property. How can I do this? The problem is whenever I call remove_vertex, the iterator to the vertices ...