18 #ifndef itkOneWayEquivalencyTable_h
19 #define itkOneWayEquivalencyTable_h
23 #include "itksys/hash_map.hxx"
24 #include "ITKWatershedsExport.h"
59 typedef itksys::hash_map<
unsigned long,
unsigned long,
78 bool Add(
unsigned long a,
unsigned long b);
83 unsigned long Lookup(
const unsigned long a)
const
87 if ( result == m_HashMap.end() ) {
return a; }
88 else {
return ( *result ).second; }
95 unsigned long RecursiveLookup(
const unsigned long a)
const;
101 if ( m_HashMap.find(a) == m_HashMap.end() ) {
return false; }
102 else {
return true; }
108 { m_HashMap.erase(a); }
112 { m_HashMap.clear(); }
116 {
return m_HashMap.empty(); }
134 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
HashTableType::iterator Iterator
unsigned long Lookup(const unsigned long a) const
SmartPointer< Self > Pointer
HashTableType::const_iterator ConstIterator
OneWayEquivalencyTable Self
bool IsEntry(const unsigned long a) const
Hash table to manage integral label equivalencies that are order dependent.
itksys::hash_map< unsigned long, unsigned long, itksys::hash< unsigned long > > HashTableType
void Erase(const unsigned long a)
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
virtual ~OneWayEquivalencyTable() override
HashTableType::value_type ValueType
Base class for all data objects in ITK.