comparison include/Motion.hpp @ 190:36968a63efe1

Got the connected_components to finally work using a vecS for the vertex list in the adjacency list. In this case, the component map is simply a vector of ints (which is the type of UndirectedGraph::vextex_descriptor (=graph_traits<FeatureGraph>::vertex_descriptor) and probably UndirectedGraph::vertices_size_type). To use listS, I was told on the Boost mailing list: >> If you truly need listS, you will need to create a vertex index >> map, fill it in before you create the property map, and pass it to the >> vector_property_map constructor (and as a type argument to that class). It may be feasible with a component map like shared_array_property_map< graph_traits<FeatureGraph>::vertex_descriptor, property_map<FeatureGraph, vertex_index_t>::const_type > components(num_vertices(g), get(vertex_index, g));
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 07 Dec 2011 18:51:32 -0500
parents 1435965d8181
children 0e60a306d324
comparison
equal deleted inserted replaced
189:1116f0a1ff31 190:36968a63efe1
114 114
115 struct VertexInformation { 115 struct VertexInformation {
116 FeatureTrajectoryPtr feature; 116 FeatureTrajectoryPtr feature;
117 }; 117 };
118 118
119 typedef boost::adjacency_list <boost::listS, boost::listS, boost::undirectedS, VertexInformation, FeatureConnection> UndirectedGraph; 119 typedef boost::adjacency_list<boost::listS, boost::vecS, boost::undirectedS, VertexInformation, FeatureConnection> UndirectedGraph;
120 120
121 float connectionDistance; 121 float connectionDistance;
122 float segmentationDistance; 122 float segmentationDistance;
123 unsigned int minFeatureTime; 123 unsigned int minFeatureTime;
124 // float minDistance; 124 // float minDistance;