00001
00002
00028 #include "graph.h"
00029
00030
00031 using namespace hugin_utils;
00032
00033
00039 void hugin_utils::findSubGraphs(AdjListGraph & graph,
00040 std::vector<int> & subgraphStart)
00041 {
00042 int nImages = (int) graph.size();
00043
00044 std::set<int> unseen;
00045
00046 for (int i=0; i<nImages; i++) unseen.insert(i);
00047
00048 while(unseen.size() != 0 ) {
00049
00050 int root = (int) *(unseen.begin());
00051 subgraphStart.push_back(root);
00052
00053 RemoveVisitor rmv(unseen);
00054 traverseVertices(graph, root, rmv);
00055 }
00056 }