|
![](/i/fill.gif) |
Margus Ramst wrote:
>
> I wouldn't really call this a dynamic array.
> For example, I recently created a macro that sampled an object (with
> Superpatch) and stored the resulting points in an array. Since changing
> the fineness of sampling and the sampled object varied the point count
> substantially, but unpredictably, I could not easily choose a good
> relationship between any sampling parameter and initial array size.
> I would have to check constantly if the array has been filled; if it
> has, I would have to do the array resize you described. Since I don't
> know how many more points are generated, how large would the resizing
> be? I would either have to add a very large chunk and consume a lot of
> memory - or add a smaller chunk, potentially requiring many more (slow)
> resizings.
> The bottom line is: it's possible, yes, but rather inflexible.
>
> Margus
I'd suggest an array of subarrays each of which would have a definite
predetermined size, but you'd still not know how many subarrays it would
take, so you're back to square one. Could you write all your samples to
a file and then be able to retrieve element [a] [b] by reading the Nth
value from the file by something like N = a x b?
Just an idea....
Post a reply to this message
|
![](/i/fill.gif) |