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 >,
162 typename TElementPriority = double,
188 virtual bool is_less(
const Superclass & element1,
189 const Superclass & element2)
const;
194 virtual bool is_greater(
const Superclass & element1,
195 const Superclass & element2)
const;
205 typename TElementWrapper,
206 typename TElementWrapperInterface,
207 typename TElementPriority = double,
229 template< typename TInputIterator >
233 TInputIterator it = first;
250 void Push(ElementWrapperType element);
252 const ElementWrapperType & Peek()
const;
259 bool Update(
const ElementWrapperType& element);
264 bool DeleteElement(
const ElementWrapperType& element);
273 return this->operator[](identifier);
278 return this->operator[](identifier);
284 this->operator[](identifier) = element;
285 m_Interface.SetLocation(element, identifier);
290 return ( ( identifier - 1 ) >> 1 );
295 return ( ( identifier << 1 ) + 1 );
300 return ( ( identifier << 1 ) + 2 );
308 void UpdateUpTree(
const ElementIdentifierType & identifier);
311 void UpdateDownTree(
const ElementIdentifierType & identifier);
318 #include "itkPriorityQueueContainer.hxx"
ElementInterfaceType m_Interface
TElementIdentifier ElementIdentifierType
virtual ~MaxPriorityQueueElementWrapper()
TElementWrapperPointer ElementWrapperPointerType
TElementWrapper ElementWrapperType
Light weight base class for most itk classes.
TElementPriority ElementPriorityType
MinPriorityQueueElementWrapper< ElementType, ElementPriorityType, ElementIdentifierType > Superclass
TElementIdentifier ElementIdentifierType
static const ElementIdentifierType m_ElementNotFound
TElementPriority ElementPriorityType
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
VectorContainer< TElementIdentifier, TElementWrapper > Superclass
ElementIdentifierType GetRight(const ElementIdentifierType &identifier) const
TElementWrapperInterface ElementInterfaceType
static const ElementIdentifierType m_ElementNotFound
const ElementWrapperType & GetElementAtLocation(const ElementIdentifierType &identifier) const
TElementIdentifier ElementIdentifierType
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
TElementIdentifier ElementIdentifierType
MinPriorityQueueElementWrapper< TElement, TElementPriority, TElementIdentifier > Superclass
unsigned long IdentifierType
bool ITKIOXML_EXPORT operator==(itk::FancyString &s, const std::string &)
PriorityQueueContainer Self