[vtk-developers] hast table in VTK

Moreland, Kenneth kmorel at sandia.gov
Thu Dec 9 11:19:52 EST 2004


My thought was that the hash table would just be a collection of
vtkObjectBase.  In this sense it would be just keys, no values (i.e. a
set, not a map).

My intension was an interface sort-of like that for Java's hashtable.
When a key is inserted, the hashcode is retrieved directly from a method
on that key.  This would only be possible if vtkObjectBase implemented
virtual hashcode methods.

-Ken

> -----Original Message-----
> From: Brad King [mailto:brad.king at kitware.com] 
> Sent: Thursday, December 09, 2004 9:10 AM
> To: Moreland, Kenneth
> Cc: vtk-developers at vtk.org
> Subject: Re: [vtk-developers] hast table in VTK
> 
> Moreland, Kenneth wrote:
> > I would like to add a hash table class to VTK.  A nice way to 
> > implement this would be to add the two methods HashCode and 
> Equals to 
> > vtkObjectBase.  What does everyone think about this?
> 
> We'll need some more details on how this will work.  The hash 
> function is needed only for keys, not for values stored in 
> the hash table.  What interface are you planning that needs 
> objects to be keys?
> 
> -Brad
> 
> 




More information about the vtk-developers mailing list