diff --git a/cpp/FactorGraph-inl.h b/cpp/FactorGraph-inl.h index bfedfa33c..f23696cde 100644 --- a/cpp/FactorGraph-inl.h +++ b/cpp/FactorGraph-inl.h @@ -272,7 +272,7 @@ void FactorGraph::associateFactor(int index, sharedFactor factor) { /* ************************************************************************* */ template template -map FactorGraph::findMinimumSpanningTree() const { +PredecessorMap FactorGraph::findMinimumSpanningTree() const { SDGraph g = gtsam::toBoostGraph, sharedFactor, Key>(*this); @@ -281,7 +281,7 @@ map FactorGraph::findMinimumSpanningTree() const { prim_minimum_spanning_tree(g, &p_map[0]); // convert edge to string pairs - map tree; + PredecessorMap tree; typename SDGraph::vertex_iterator itVertex = boost::vertices(g).first; typename vector::Vertex>::iterator vi; for (vi = p_map.begin(); vi!=p_map.end(); itVertex++, vi++) { diff --git a/cpp/FactorGraph.h b/cpp/FactorGraph.h index c49a669cd..af54edcbf 100644 --- a/cpp/FactorGraph.h +++ b/cpp/FactorGraph.h @@ -120,7 +120,7 @@ namespace gtsam { /** * find the minimum spanning tree. */ - template std::map findMinimumSpanningTree() const; + template PredecessorMap findMinimumSpanningTree() const; /** * Split the graph into two parts: one corresponds to the given spanning tre,