F
fivelitermustang
Essentially what the program needs to do is split apart a large group of
data and then it further splits apart the groups of data, etc...
For example, Level 0 starts off with a large array data. The data is split
apart into "n" groups. Then each group in there is also split apart into
"n" groups and it continues on like that. For each branch of data the
matrix is "
Here is a quick picture I drew to illustrate what I'm doing:
http://members.shaw.ca/fivelitermustang/split.gif
I have all the code written for the functions and things and I can make
the program do what I need to do if I hardcode it but I need to program to
be able to take in any type of dimensions of data and split into any
number of levels defined by the user.
I have already hardcoded the split from 0->1, which is fine.
I need to be able to split the resulting matrices of data into further and
further levels specified by the user.
To calculate the split from 1->2 I must take each of the 2 branches of
that matrix and split it into two pieces... yielding 4 branches on the
next level.
To calculate the split from 2->3 I must take each of the 4 branches of
that matrix and split that into two pieces... yielding 8 branches on the
next level.
I also need to find a way to iterate through each branch infinitely many
levels deep. The function needs to have the data passed in from level 1 to
calculate level 2. When level two is calculated the function is called
again with the blocks from level 2 to generate blocks in level 3.
I am not sure how to do this... for example if the user wanted to split
the data into 3 groups then the function to stem 3 more branches off each
block would be used 3 times on the first level, then it would have to be
used 9 times on the second level and then 27 times on the third level...
etc...
How would I mathematically implement that?
In addition what would be a good way to store the data in each "block"...
I'm thinking a three dimensional array where the first dimension is an
index number and the last two dimensions store the actual information in
that matrix.
data and then it further splits apart the groups of data, etc...
For example, Level 0 starts off with a large array data. The data is split
apart into "n" groups. Then each group in there is also split apart into
"n" groups and it continues on like that. For each branch of data the
matrix is "
Here is a quick picture I drew to illustrate what I'm doing:
http://members.shaw.ca/fivelitermustang/split.gif
I have all the code written for the functions and things and I can make
the program do what I need to do if I hardcode it but I need to program to
be able to take in any type of dimensions of data and split into any
number of levels defined by the user.
I have already hardcoded the split from 0->1, which is fine.
I need to be able to split the resulting matrices of data into further and
further levels specified by the user.
To calculate the split from 1->2 I must take each of the 2 branches of
that matrix and split it into two pieces... yielding 4 branches on the
next level.
To calculate the split from 2->3 I must take each of the 4 branches of
that matrix and split that into two pieces... yielding 8 branches on the
next level.
I also need to find a way to iterate through each branch infinitely many
levels deep. The function needs to have the data passed in from level 1 to
calculate level 2. When level two is calculated the function is called
again with the blocks from level 2 to generate blocks in level 3.
I am not sure how to do this... for example if the user wanted to split
the data into 3 groups then the function to stem 3 more branches off each
block would be used 3 times on the first level, then it would have to be
used 9 times on the second level and then 27 times on the third level...
etc...
How would I mathematically implement that?
In addition what would be a good way to store the data in each "block"...
I'm thinking a three dimensional array where the first dimension is an
index number and the last two dimensions store the actual information in
that matrix.