I am working with a graphing using Boost library. The graph is defined as follows.
typedef boost::adjacency_list<boost::setS,boost::setS,boost::undirectedS, uint32_t, float> AdjacencyList;
After creating the graph using appropriate data, in a separate function I want to print the adjacent_vertices of each vertex with their appropriate edge weight as computed in the beginning.
The creating part works well but when I want to extract adjacent vertices I dont get the values.
typedef boost::graph_traits<AdjacencyList>::adjacency_iterator AdjacencyIterator;
AdjacencyList::vertex_iterator i, end;
for (boost::tie(i, end) = boost::vertices(adjacency_list); i != end; i++) {
AdjacencyIterator ai, a_end;
boost::tie(ai, a_end) = boost::adjacent_vertices( *i, adjacency_list);
for (; ai != a_end; ai++) {
std::cout << *ai << "\t";
}
}
The Output I get are memory address in Hexademial number. How can I get vertex indices and the edge weight?
supervoxel_adjacency_list
? You know, it's not worth wasting time on ill-posed questions. – sehe