[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pooma-dev] (Minor) Pooma Tutorial Questions
From: |
James Crotinger |
Subject: |
Re: [pooma-dev] (Minor) Pooma Tutorial Questions |
Date: |
Fri, 23 Mar 2001 06:59:10 -0700 |
User-agent: |
Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022 |
on 3/22/01 10:33 AM, Julian C. Cummings at address@hidden wrote:
> I asked about introducing iterators
> for DynamicArrays, since they are inherently 1D
> data structures.
The problem, I believe, is that multi-patch dynamic arrays only look 1D.
Implementation wise they're not like a 1D array at all; i.e. they are not in
a single contiguous block of memory. Thus the iterator has to have an
if-test. If people are willing to live with this (as they seem to be for
indexing, which also has this problem if done on the whole multi-patch
dynamic array), the using an iterator would avoid he need to have the
particles numbered. On the other hand, without numbering and the ability to
do
for (i = 0; i < size; ++i) a(i);
the array 'a' is not very array-like. I think the above has to be possible
if we're calling a an Array. If we want to have a ParticleSet that can only
be iterated through, that would be a different data structure.
Jim