X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FBase%2FDijkstra.h;h=c93d575c927c176c41a79bdaf22755e8594ec130;hb=479d85a44365c8aa01976ffb9c7d67d3e9e52b63;hp=08c704e83b9b7d019eafd6904be1b68158d8e771;hpb=40fb0405cfef444001429f8ba49c407ce9168a94;p=FrontAlgorithms.git diff --git a/lib/fpa/Base/Dijkstra.h b/lib/fpa/Base/Dijkstra.h index 08c704e..c93d575 100644 --- a/lib/fpa/Base/Dijkstra.h +++ b/lib/fpa/Base/Dijkstra.h @@ -1,7 +1,12 @@ +// ========================================================================= +// @author Leonardo Florez Valencia +// @email florez-l@javeriana.edu.co +// ========================================================================= + #ifndef __fpa__Base__Dijkstra__h__ #define __fpa__Base__Dijkstra__h__ -#include +#include namespace fpa { @@ -9,48 +14,48 @@ namespace fpa { /** */ - template< class _TSuperclass, class _TMST > + template< class _TAlgorithm, class _TMST > class Dijkstra - : public fpa::Base::PriorityQueueAlgorithm< _TSuperclass > + : public fpa::Base::DijkstraBase< _TAlgorithm > { public: - typedef Dijkstra Self; - typedef fpa::Base::PriorityQueueAlgorithm< _TSuperclass > Superclass; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; + typedef Dijkstra Self; + typedef fpa::Base::DijkstraBase< _TAlgorithm > Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; typedef _TMST TMST; - typedef typename Superclass::TOutput TOutput; - typedef typename Superclass::TVertex TVertex; - protected: - typedef typename Superclass::_TQueueNode _TQueueNode; + typedef typename Superclass::TNode TNode; + typedef typename Superclass::TNodes TNodes; + typedef typename Superclass::TInputValue TInputValue; + typedef typename Superclass::TOutputValue TOutputValue; + typedef typename Superclass::TFrontId TFrontId; + typedef typename Superclass::TVertex TVertex; + typedef typename Superclass::TSeeds TSeeds; - public: - itkTypeMacro( Dijkstra, Algorithm ); + typedef typename Superclass::TQueue TQueue; + typedef typename Superclass::TQueueOrder TQueueOrder; + typedef typename Superclass::TWeightFunction TWeightFunction; public: - _TMST* GetMinimumSpanningTree( ); - const _TMST* GetMinimumSpanningTree( ) const; + TMST* GetMinimumSpanningTree( ); + const TMST* GetMinimumSpanningTree( ) const; protected: Dijkstra( ); virtual ~Dijkstra( ); virtual void _AfterGenerateData( ) override; - - virtual void _UpdateResult( const _TQueueNode& n ) override; - virtual bool _UpdateValue( - _TQueueNode& v, const _TQueueNode& p - ) override; + virtual void _UpdateOutputValue( const TNode& n ) override; private: - // Purposely not defined + // Purposely not implemented. Dijkstra( const Self& other ); Self& operator=( const Self& other ); protected: - unsigned long m_MSTIndex; + unsigned int m_MSTIdx; }; } // ecapseman