First time here? Check out the FAQ!
x

ZeroBasedArray 3d

0 votes
369 views
hello everybody,

I am trying to design my own tool for a genetic algorithm.

reading an old thread on the forum about cellular automata, I found a tool where I saw a

"ZeroBasedArray3d".

I would like to know more about what it is and which messages can be sent to it, as it looks like thiskind of object fits for a genetic algorithm too.

thanks.
asked Feb 28, 2018 in Capytalk & Smalltalk by domenico-cipriani (Master) (3,110 points)

1 Answer

+1 vote
 
Best answer
Hi Domenico,

It is a 3 dimensional array where the first index is 0 (rather than 1). You can access it with at:at:at:, for example

a3dArray at: x at: y at: z

and set it similarly, for example

a3dArray at: x at: y at: z put: 1

In the CA tool, there should be some additional examples of how to use it.
answered Mar 1, 2018 by ssc (Savant) (126,620 points)
selected Mar 1, 2018 by domenico-cipriani
thank you very much for the quick reply. is there any other particular array structure I should know about? where can I find some reference to this?
best.
d
...