18 #ifndef itkOneWayEquivalencyTable_h
19 #define itkOneWayEquivalencyTable_h
23 #include "itksys/hash_map.hxx"
24 #include "ITKWatershedsExport.h"
61 using HashTableType = itksys::hash_map<
unsigned long,
unsigned long,
62 itksys::hash< unsigned long > >;
80 bool Add(
unsigned long a,
unsigned long b);
85 unsigned long Lookup(
const unsigned long a)
const
89 if ( result == m_HashMap.end() ) {
return a; }
90 else {
return ( *result ).second; }
97 unsigned long RecursiveLookup(
const unsigned long a)
const;
103 if ( m_HashMap.find(a) == m_HashMap.end() ) {
return false; }
104 else {
return true; }
110 { m_HashMap.erase(a); }
114 { m_HashMap.clear(); }
118 {
return m_HashMap.empty(); }
134 void PrintSelf(std::ostream & os,
Indent indent)
const override;
unsigned long Lookup(const unsigned long a) const
HashTableType::iterator Iterator
class ITK_FORWARD_EXPORT DataObject
bool IsEntry(const unsigned long a) const
Hash table to manage integral label equivalencies that are order dependent.
HashTableType::const_iterator ConstIterator
HashTableType::value_type ValueType
void Erase(const unsigned long a)
Control indentation during Print() invocation.
Base class for most ITK classes.
Base class for all data objects in ITK.
itksys::hash_map< unsigned long, unsigned long, itksys::hash< unsigned long > > HashTableType