[vtkusers] Doubt about vtk hash implementation...

David Cole david.cole at kitware.com
Wed Apr 30 10:00:38 EDT 2008


line 1452:
  // Look for existing quad in the hash;
  end = this->QuadHash + a;

"a" is used as the starting location of the search. A brute force search
would start at 0 and look at every element up to "a" as well. This is the
best case sort of hash table where you are happily able to use the input
*as* the hash index...


Does that make it clearer?
David


On Wed, Apr 30, 2008 at 9:51 AM, Renato N. Elias <rnelias at nacad.ufrj.br>
wrote:

> Hi folks,
>
> I was trying to understand a VTK algorithm inside vtkDataSetSurfaceFilter
> class. In this class, there's a method called InsertQuadInHash (line 1418).
> My doubt is that after studying the code, I was not able to find where the
> hash index is being computed. From my knowledge, a hash table is made of
> indexes which are computed using some sort of hash function but this
> algorithm seems to be only a brute force search inside a linked list. What
> am I missing?
>
> thanks for any clarification
>
> Renato.
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080430/e1dfe937/attachment.htm>


More information about the vtkusers mailing list