]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Base/Dijkstra.hxx
...
[FrontAlgorithms.git] / lib / fpa / Base / Dijkstra.hxx
index 765b9a8beaf2c984511f17fc7b28812e3bb28278..3584b1ab406a57a282c2b491345840208101522c 100644 (file)
@@ -108,7 +108,7 @@ void fpa::Base::Dijkstra< _TFilter, _TMarksInterface, _TSeedsInterface, _TMST >:
 GenerateData( )
 {
   // Init objects
-  this->_ConfigureOutputs( TOutputValue( 0 ) );
+  this->_ConfigureOutputs( std::numeric_limits< TOutputValue >::max( ) );
   this->_InitMarks( this->GetNumberOfSeeds( ) );
   TMST* mst = this->GetMinimumSpanningTree( );
 
@@ -136,8 +136,10 @@ GenerateData( )
 
     // Add neighborhood
     TVertices neighbors = this->_GetNeighbors( node.Vertex );
-    for( TVertex neigh: neighbors )
+    typename TVertices::const_iterator neighIt = neighbors.begin( );
+    for( ; neighIt != neighbors.end( ); ++neighIt )
     {
+      TVertex neigh = *neighIt;
       if( this->_IsMarked( neigh ) )
       {
         // Invoke stop at collisions
@@ -178,8 +180,8 @@ GenerateData( )
   // Complete data into minimum spanning tree
   mst->ClearSeeds( );
   mst->SetCollisions( this->m_Collisions );
-  for( TVertex seed: this->GetSeeds( ) )
-    mst->AddSeed( seed );
+  for( sIt = this->BeginSeeds( ); sIt != this->EndSeeds( ); ++sIt )
+    mst->AddSeed( *sIt );
 }
 
 #endif // __fpa__Base__Dijkstra__hxx__