[prev in list] [next in list] [prev in thread] [next in thread]
List: vtk-developers
Subject: RE: [vtk-developers] Data structures in VTK
From: Will Schroeder <will.schroeder () kitware ! com>
Date: 2001-12-31 19:31:46
Message-ID: 5.1.0.14.0.20011231143039.00bcec68 () pop ! nycap ! rr ! com
[Download RAW message or body]
Hi Andy-
vtkDataArrays are dynamic arrays. We already have these.
Will
At 11:20 AM 12/31/2001 -0500, Andy Cedilnik wrote:
>Hello!
>
>I don't think some primitive containers are too difficult to write. I mean
>the hash
>tables and lists that are scattered around VTK tree were probably written in
>short amount of time anyway. Let us start selectively and add these classes
>to VTK. I suggest we brainstorm the interface that will fulfill
>everybody's needs.
>
>So, for example, I need this in a dynamic array:
>
>Find(x) // finds element x
>Insert(i, x) // inserts element x at position i
>Append(x) // appends element x
>Prepend(x) // prepend element x
>Remove(i) // remove's element at position i
>Clean() // removes all elements
>Size() // returns number of elements
>RealSize() // returns size of internal array
>
>The find is tricky, because you need a comparison function.
>All other methods are pretty trivial.
>Some other methods:
>Sort(i,j) // Sorts the range between i and j
>Remove(j,j) // Remove range between i and j
>Reverse(j,j) // Reverse range between i and j
>
>and so on. You get the picture.
>
>I vote for developing our own containers. We could potentially use similar
>interface as STL.
>
> Andy
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic