[graph] breadth_first_search with a structure

Hello,
I have a problem with the breadth_first_search. I read the documentation
and examples an can't find a solution for my problem. In order
breadth_first_search uses a bfs_discovery_visitor

Hi Daniel,
2006/9/11, boost@daniel-gohlke.de
Hello,
I have a problem with the breadth_first_search. I read the documentation and examples an can't find a solution for my problem. In order breadth_first_search uses a bfs_discovery_visitor
vis(&distanceSet[0]);. This distance vector storing all distances. So, now I need more then a vector. I want use a struct for storing the distances and later some other stuff e.g. probability of distances and cumulative probabilitys. I tried several code, but get every time errors from VC++ compiler. Can anybody tell me, how do I handle this vector .
You could use bundles properties in your graph:
struct tVertex{
long distance;
double probability;
}
Those can be used in the adjacency list like the follows:
typedef adjacency_list < vecS, vecS, undirectedS, tVertex> tGraph;
after that you get a property map from the graph:
typedef property_map
The second question is, can I abort the further evaluation of distances, if any theshold is reached? The graph has about 57000 vertices an every vertice has about 6 edges. I am interested only for the vertices in a given range (e.g. 100).
What I found from searching the archives is to throw an exception from inside the visitor if a certain distance is reached. HTH, Stephan
participants (2)
-
boost@daniel-gohlke.de
-
Stephan Diederich