> A few holiday thoughts on arrays...
>
> Coming from a non-programmer background, I found arrays rather
> intimidating until I began to realize how similar they are to
> everyday items:
>
> One-dimensional array: like a numbered list.
> Two-dimensional array: like a spreadsheet or table with cell
> references based on row and
> column.
> Three-dimensional array: like a cube with cell references based
> on 3 dimensions.
>
> Of course, I know that in CF, arrays are dynamic -- each "row"
> of a 2 dimensional
> array can be a different length. A 2-dim array is really just a
> one-dimensional array
> where each cell is occupied by a one-dimensional array of any length.
>
> Although I've often heard it said that it's difficult to
> visualize arrays of more than
> 3-dimensions, I wonder if a game we used to play as children
> might help....It was called
> Quad, and was basically a multi-tiered Tic-Tac-Toe game --
> multiple levels of rows and
> columns. So, ignoring the fact that CF arrays don't necessarily
> have the same number of
> elements in each dimension, I'd be interested in feedback on
> whether the following
> models accurately portray complex arrays:
>
> Three-dimensional array: Like a "Quad" game. Example:
> MyArray[2][3][1] means the data
> that's stored on the second level of the game, third row and first column.
>
<cf_snip>
> I could keep going... 7 dimensions would be like a string of huge
> quad games, with each
> of the huge quad games having each of their cells occuped by a
> Quad game...Seems like you
> could keep going forever...
>
> Accurate depiction? Next question: When would you need a
> 7-dimension array?
Being as I don't know the game Quad, I tend to think of a three dimensional
array as a "Rubix-cube" visually.
The easiest way to explain the 4th dimension is probably (what is it)
Time...
"This is what the cube looked like at 9am, and this is what it looked like
at 10am"
Your analogy for 5+ arrays fits into my explanation closely after that -
cubes within each square of the previous cube.
I have so far hit the limit at about 6 dimensions, and then only when I was
storing huge amounts of data, the problem arose when trying to load the data
(this ended up taking more time than the rest of the template took to run)
I ended up giving my colleagues a head-ache when explaining how 4+
dimensional arrays work, and none of them can visualise them - which means
they have to get pen and paper out <g>
Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 04 July 2000 00:25
> To: [EMAIL PROTECTED]
> Subject: What an Array Looks Like
>
>
>
> Gene Kraybill
> ------------------------------------------------------------------
> ------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.