# HG changeset patch # User Nicolas Saunier # Date 1322871113 18000 # Node ID 1116f0a1ff312a2d5324d582bc510afe71853f06 # Parent 1435965d8181dba27d91fe1ca7f3e2861d8822f4 work on connected components (does not compile) diff -r 1435965d8181 -r 1116f0a1ff31 c/Motion.cpp --- a/c/Motion.cpp Thu Dec 01 19:18:32 2011 -0500 +++ b/c/Motion.cpp Fri Dec 02 19:11:53 2011 -0500 @@ -159,22 +159,22 @@ UndirectedGraph::edge_descriptor e; bool unused; tie(e, unused) = add_edge(newVertex, *vi, graph); - // no need to add measures to graph[e] + // no need to add measures to graph[e] (edge properties) } } } } void FeatureGraph::connectedComponents(const int& lastInstant) { - vector component(num_vertices(graph)); - // int num = connected_components(graph, &component[0]); - // todo change the type of the component map http://www.boost.org/doc/libs/1_48_0/libs/graph/doc/connected_components.html - + typedef boost::graph_traits::vertices_size_type vertices_size_type; + vector components(num_vertices(graph)); + // int num = connected_components(graph, &components[0]); + // // todo change the type of the component map http://www.boost.org/doc/libs/1_48_0/libs/graph/doc/connected_components.html // cout << "Total number of components: " << num << endl; - for (unsigned int i = 0; i < component.size(); ++i) - cout << "Vertex " << i <<" is in component " << component[i] << endl; - cout << endl; + // for (unsigned int i = 0; i < components.size(); ++i) + // cout << "Vertex " << i <<" is in component " << components[i] << endl; + // cout << endl; } string FeatureGraph::informationString(void) { diff -r 1435965d8181 -r 1116f0a1ff31 c/feature-based-tracking.cpp --- a/c/feature-based-tracking.cpp Thu Dec 01 19:18:32 2011 -0500 +++ b/c/feature-based-tracking.cpp Fri Dec 02 19:11:53 2011 -0500 @@ -287,7 +287,7 @@ // check for connected components that are old enough (no chance to match with trajectories to be added later if (frameNum%10 == 0) { - + featureGraph.connectedComponents(frameNum-maxTrajectoryLength+params.minFeatureTime); } cout << featureGraph.informationString() << endl;