18 #ifndef itkPriorityQueueContainer_h
19 #define itkPriorityQueueContainer_h
35 template<
typename TElement,
67 template<
typename TElementWrapperPointer,
104 typename TElementPriority = double,
109 MinPriorityQueueElementWrapper< TElement,
111 TElementIdentifier >,
162 typename TElementPriority = double,
205 typename TElementWrapper,
206 typename TElementWrapperInterface,
207 typename TElementPriority = double,
229 template<
typename TInputIterator >
233 TInputIterator it = first;
273 return this->operator[](identifier);
278 return this->operator[](identifier);
284 this->operator[](identifier) = element;
290 return ( ( identifier - 1 ) >> 1 );
295 return ( ( identifier << 1 ) + 1 );
300 return ( ( identifier << 1 ) + 2 );
318 #include "itkPriorityQueueContainer.hxx"
ElementInterfaceType m_Interface
TElementIdentifier ElementIdentifierType
virtual ~MaxPriorityQueueElementWrapper()
TElementWrapperPointer ElementWrapperPointerType
virtual bool is_greater(const MinPriorityQueueElementWrapper &element1, const MinPriorityQueueElementWrapper &element2) const
TElementWrapper ElementWrapperType
Light weight base class for most itk classes.
virtual bool is_less(const MaxPriorityQueueElementWrapper &element1, const MaxPriorityQueueElementWrapper &element2) const
TElementPriority ElementPriorityType
TElementIdentifier GetLocation(const ElementWrapperPointerType &element) const
MinPriorityQueueElementWrapper< ElementType, ElementPriorityType, ElementIdentifierType > Superclass
TElementIdentifier ElementIdentifierType
void UpdateDownTree(const ElementIdentifierType &identifier)
static const ElementIdentifierType m_ElementNotFound
TElementPriority ElementPriorityType
MaxPriorityQueueElementWrapper()
SmartPointer< const Self > ConstPointer
static const ElementIdentifierType m_ElementNotFound
TElementIdentifier ElementIdentifierType
bool HasParent(const ElementIdentifierType &iId) const
ElementIdentifierType m_Location
void SetElementAtLocation(const ElementIdentifierType &identifier, ElementWrapperType &element)
ElementPriorityType m_Priority
SmartPointer< Self > Pointer
ElementWrapperType & GetElementAtLocation(const ElementIdentifierType &identifier)
ElementIdentifierType GetParent(const ElementIdentifierType &identifier) const
ElementIdentifierType GetLeft(const ElementIdentifierType &identifier) const
SizeValueType IdentifierType
virtual void SetLocation(ElementType &element, const ElementIdentifierType &identifier)=0
VectorContainer< TElementIdentifier, TElementWrapper > Superclass
ElementIdentifierType GetRight(const ElementIdentifierType &identifier) const
TElementWrapperInterface ElementInterfaceType
ElementIdentifierType GetLocation(const MinPriorityQueueElementWrapper &element) const
static const ElementIdentifierType m_ElementNotFound
virtual ~MinPriorityQueueElementWrapper()
void UpdateUpTree(const ElementIdentifierType &identifier)
void SetLocation(MinPriorityQueueElementWrapper &element, const ElementIdentifierType &identifier)
void SetLocation(ElementWrapperPointerType &element, const ElementIdentifierType &identifier)
virtual bool is_less(const MinPriorityQueueElementWrapper &element1, const MinPriorityQueueElementWrapper &element2) const
virtual bool is_greater(const ElementType &element1, const ElementType &element2) const =0
bool operator==(const MinPriorityQueueElementWrapper &other) const
virtual ElementIdentifierType GetLocation(const ElementType &element) const =0
virtual ~ElementWrapperInterface()
ElementWrapperInterface()
ElementWrapperPointerInterface()
const ElementWrapperType & GetElementAtLocation(const ElementIdentifierType &identifier) const
~PriorityQueueContainer()
TElementIdentifier ElementIdentifierType
bool operator<(const MinPriorityQueueElementWrapper &other) const
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
TElementIdentifier ElementIdentifierType
void Push(ElementWrapperType element)
virtual ~ElementWrapperPointerInterface()
const ElementWrapperType & Peek() const
virtual bool is_less(const ElementType &element1, const ElementType &element2) const =0
MinPriorityQueueElementWrapper()
bool Update(const ElementWrapperType &element)
MinPriorityQueueElementWrapper< TElement, TElementPriority, TElementIdentifier > Superclass
virtual bool is_less(const ElementWrapperPointerType &element1, const ElementWrapperPointerType &element2) const
virtual bool is_greater(const MaxPriorityQueueElementWrapper &element1, const MaxPriorityQueueElementWrapper &element2) const
bool DeleteElement(const ElementWrapperType &element)
unsigned long IdentifierType
virtual bool is_greater(const ElementWrapperPointerType &element1, const ElementWrapperPointerType &element2) const
PriorityQueueContainer(TInputIterator first, TInputIterator last)
PriorityQueueContainer Self
bool operator>(const MinPriorityQueueElementWrapper &other) const