]> Creatis software - FrontAlgorithms.git/blob - libs/fpa/Base/Dijkstra.h
...
[FrontAlgorithms.git] / libs / fpa / Base / Dijkstra.h
1 #ifndef __fpa__Base__Dijkstra__h__
2 #define __fpa__Base__Dijkstra__h__
3
4 #include <fpa/Base/PriorityQueueAlgorithm.h>
5
6 namespace fpa
7 {
8   namespace Base
9   {
10     /**
11      */
12     template< class _TSuperclass, class _TMST >
13     class Dijkstra
14       : public fpa::Base::PriorityQueueAlgorithm< _TSuperclass >
15     {
16     public:
17       typedef Dijkstra                                          Self;
18       typedef fpa::Base::PriorityQueueAlgorithm< _TSuperclass > Superclass;
19       typedef itk::SmartPointer< Self >                         Pointer;
20       typedef itk::SmartPointer< const Self >                   ConstPointer;
21
22       typedef _TMST TMST;
23       typedef typename Superclass::TOutput TOutput;
24       typedef typename Superclass::TVertex TVertex;
25
26     protected:
27       typedef typename Superclass::_TQueueNode _TQueueNode;
28
29     public:
30       itkTypeMacro( Dijkstra, Algorithm );
31
32     public:
33       _TMST* GetMinimumSpanningTree( );
34       const _TMST* GetMinimumSpanningTree( ) const;
35
36     protected:
37       Dijkstra( );
38       virtual ~Dijkstra( );
39
40       virtual void _AfterGenerateData( ) override;
41
42       virtual void _UpdateResult( const _TQueueNode& n ) override;
43       virtual bool _UpdateValue(
44         _TQueueNode& v, const _TQueueNode& p
45         ) override;
46
47     private:
48       // Purposely not defined
49       Dijkstra( const Self& other );
50       Self& operator=( const Self& other );
51
52     protected:
53       unsigned long m_MSTIndex;
54     };
55
56   } // ecapseman
57
58 } // ecapseman
59
60 #ifndef ITK_MANUAL_INSTANTIATION
61 #  include <fpa/Base/Dijkstra.hxx>
62 #endif // ITK_MANUAL_INSTANTIATION
63
64 #endif // __fpa__Base__Dijkstra__h__
65
66 // eof - $RCSfile$