]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Base/MinimumSpanningTree.hxx
...
[FrontAlgorithms.git] / lib / fpa / Base / MinimumSpanningTree.hxx
index c5838f319be7784e4d949796aee058ac1d442a75..00e4159c98c489c6140d9e58572815c646449123 100644 (file)
@@ -124,6 +124,7 @@ typename fpa::Base::MinimumSpanningTree< _TVertex, _Superclass >::
 TVertices fpa::Base::MinimumSpanningTree< _TVertex, _Superclass >::
 GetPath( const _TVertex& a, const _TVertex& b ) const
 {
+#error no hace bien el backtracking!
   static const unsigned long _inf =
     std::numeric_limits< unsigned long >::max( );
 
@@ -163,7 +164,7 @@ GetPath( const _TVertex& a, const _TVertex& b ) const
       {
         // First path: from start vertex to first collision
         vertices = this->GetPath(
-          a, this->m_Collisions[ fpath[ 0 ] ][ fpath[ 1 ] ].first
+          a, this->m_Collisions[ fpath[ 1 ] ][ fpath[ 0 ] ].first
           );
 
         // Intermediary paths
@@ -182,7 +183,7 @@ GetPath( const _TVertex& a, const _TVertex& b ) const
         // Final path: from last collision to end point
         TVertices lpath =
           this->GetPath(
-            this->m_Collisions[ fpath[ N - 1 ] ][ fpath[ N - 2 ] ].first, b
+            this->m_Collisions[ fpath[ N - 2 ] ][ fpath[ N - 1 ] ].first, b
             );
         for( long id = 0; id < lpath.size( ); ++id )
           vertices.push_back( lpath[ id ] );