18 #ifndef itkPriorityQueueContainer_h
19 #define itkPriorityQueueContainer_h
35 template<
typename TElement,
55 virtual bool is_greater(
const ElementType & element1,
67 template<
typename TElementWrapperPointer,
104 typename TElementPriority = double,
109 MinPriorityQueueElementWrapper< TElement,
111 TElementIdentifier >,
117 TElementPriority, TElementIdentifier >;
161 typename TElementPriority = double,
204 typename TElementWrapper,
205 typename TElementWrapperInterface,
206 typename TElementPriority = double,
228 template<
typename TInputIterator >
232 TInputIterator it = first;
249 void Push(ElementWrapperType element);
251 const ElementWrapperType & Peek()
const;
258 bool Update(
const ElementWrapperType& element);
263 bool DeleteElement(
const ElementWrapperType& element);
272 return this->operator[](identifier);
277 return this->operator[](identifier);
283 this->operator[](identifier) = element;
284 m_Interface.SetLocation(element, identifier);
289 return ( ( identifier - 1 ) >> 1 );
294 return ( ( identifier << 1 ) + 1 );
299 return ( ( identifier << 1 ) + 2 );
307 void UpdateUpTree(
const ElementIdentifierType & identifier);
310 void UpdateDownTree(
const ElementIdentifierType & identifier);
317 #include "itkPriorityQueueContainer.hxx"
ElementInterfaceType m_Interface
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
TElementIdentifier ElementIdentifierType
Light weight base class for most itk classes.
TElementWrapperInterface ElementInterfaceType
static const ElementIdentifierType m_ElementNotFound
bool operator>(const Index< VDimension > &one, const Index< VDimension > &two)
static const ElementIdentifierType m_ElementNotFound
bool HasParent(const ElementIdentifierType &iId) const
ElementIdentifierType m_Location
void SetElementAtLocation(const ElementIdentifierType &identifier, ElementWrapperType &element)
ElementPriorityType m_Priority
TElementIdentifier ElementIdentifierType
ElementWrapperType & GetElementAtLocation(const ElementIdentifierType &identifier)
unsigned long IdentifierType
ElementIdentifierType GetParent(const ElementIdentifierType &identifier) const
ElementIdentifierType GetLeft(const ElementIdentifierType &identifier) const
TElementIdentifier ElementIdentifierType
ElementIdentifierType GetRight(const ElementIdentifierType &identifier) const
static const ElementIdentifierType m_ElementNotFound
TElementWrapper ElementWrapperType
SizeValueType IdentifierType
const ElementWrapperType & GetElementAtLocation(const ElementIdentifierType &identifier) const
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
TElementPriority ElementPriorityType
TElementWrapperPointer ElementWrapperPointerType
TElementIdentifier ElementIdentifierType
PriorityQueueContainer(TInputIterator first, TInputIterator last)