Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Hash Tables - BiHashC<class D1T,class D2T>
 

  PUBLIC
BiHashC::BiHashC(UIntT)
BiHashC::Map1(const D1T &)
BiHashC::Fwd(const D1T &)
BiHashC::LookupFwd(const D1T &,D2T &)
BiHashC::IsFwd(const D1T &) const
BiHashC::Map2(const D2T &)
BiHashC::Bkw(const D2T &)
BiHashC::LookupBkw(const D2T &,D1T &)
BiHashC::IsBkw(const D2T &) const
BiHashC::Insert(const D1T &,const D2T &)
BiHashC::DelMap1(const D1T &)
BiHashC::DelMap2(const D2T &)
BiHashC::Size(void) const

   BiHashC<class D1T,class D2T>   
 
Bi-directional hash table.
 
include "Ravl/BiHash.hh"
Created:1/9/96 
Source file:Ravl/Core/Container/Hash/BiHash.hh
User Level:Normal
Library:RavlCore
Example:exBiHash.cc
In Scope:RavlN

Comments:
This allows a reversable mapping between two hashed items. For quick mapping in both directions. Forward is nominally from D1T to D2T.

Variables:
HashC hmap1;

HashC hmap2;

Methods:
BiHashC(UIntT nBins = 23)
Constructor.

D2T & Map1(const D1T & key)
Do a lookup on data type 1

D2T & Fwd(const D1T & key)
Do a lookup on data type 1

bool LookupFwd(const D1T & key,D2T & data)
Lookup forward.
Return true if entry is found and copy result into 'data'. Otherwise returns false and data is unaffected.

bool IsFwd(const D1T & key) const
Do we have a forward mapping.

D1T & Map2(const D2T & key)
Do a lookup on data type 2;

D1T & Bkw(const D2T & key)
Do a lookup on data type 2

bool LookupBkw(const D2T & key,D1T & data)
Lookup backward.
Return true if entry is found and copy result into 'data'. Otherwise returns false and data is unaffected.

bool IsBkw(const D2T & key) const
Do we have a forward mapping.

bool Insert(const D1T & d1,const D2T & d2)
Insert a mapping into the table.
Should check that they are reversable ?

bool DelMap1(const D1T & key)
Delete a mapping from the table, using d1 as the key.

bool DelMap2(const D2T & key)
Delete a mapping from the table, using d2 as the key.

UIntT Size() const
Get number of mappings.


Maintainer:Charles Galambos, Created: 1/9/96, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002