[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtk-developers
Subject:    Re: [vtk-developers] hast table in VTK
From:       Brad King <brad.king () kitware ! com>
Date:       2004-12-13 15:51:46
Message-ID: 41BDBA92.1090803 () kitware ! com
[Download RAW message or body]

Moreland, Kenneth wrote:
> There must be some miscommunication here, because the class I'm
> describing works exactly the same as the Hashtable class that has been
> distributed with Java since the language's creation.  The features I
> describe are not only possible, but often useful.

After discussing this with other developers at Kitware we have decided 
not to introduce such an API into the top of VTK.

> Here is a toy example.  Let's say I want to keep a collection (that is,
> a set, not a map) of faces in a mesh with some special property.  As I
> do some computation on the mesh, I want to quickly check to see if the
> face I'm working on is part of this set.  I should be able to do this by
> storing a bunch of objects in the hashtable (perhaps vtkPolygon objects)
> that identify the faces by their point ids.  As I do my computation, I
> could easily make two objects that describe the same face.  Therefore, I
> want two of these objects to be "equal" if they describe the same face
> even if they are in different locations in memory.

If you are storing cells in a hash table indexed by connectivity then 
vtkObject's are much too heavy to be fast for this purpose.  You'll want 
to use a customized hash-table with small hand-written structures 
storing the connectivity.

-Brad

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic