Re: Multidimensional Packed Bit Array



ok lets put it another way with leters instead of numbers wich might be
clearer...

for an array with dimensions of

a=new MyBitType[n3,n2,n1];

....contains n1*n2*n3 elements

so if you want to map a 3 dim array into a single dim array

MyBitType[] b=new MyBitType[n3*n2*n1];

a[x,y,z]
....becomes
b[x*n2*n1+y*n1+z]

although I warn you ive not finished my first cup of coffee of the morning
yet so
cant garantee its corect.

.... i find the hardest things to explain are the things that seem so obvious
to me.

ofc this is assuming the MyBitType takes care of the actual 1 dimensional
bitfield itself
wich is fairly easy but can be explained if needed.

Colin =^.^=

<christery@xxxxxxxxx> wrote in message
news:2719db8a-063a-400d-aaed-e6cd8a0d6411@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
the offset and multiplier for each dimension is simply the total size of
the
lower order dimension.

so for an array a[3,3,3]

would be 27 bits big, a[x,y,z] -> BitArrayStore[x*9+y*3+z]

Colin =^.^=

just dont get it, should be 3*3*3=27,

x*9+y*3+z is what? new mathematics? what is x,y,z? 3*9+3*3+3 != 27

just dont get it *as always*

But u are probably correct...

//CY


.



Relevant Pages

  • Re: Gaussian cluster antenna array data
    ... A gaussian array is aimed towards resonant elements in cluster form. ... but these dimensions have not been ...
    (rec.radio.amateur.antenna)
  • RE: Mass Adding Comments
    ... insert code to fill your own array as desired at the beginning of the ... 'Determine number of dimensions in array using Chip Pearson's method ... ' Loop, increasing the dimension index Ndx, until an error occurs. ... 'Exit sub if dimensions do not match ...
    (microsoft.public.excel.programming)
  • Re: Gaussian cluster antenna array data
    ... A gaussian array is aimed towards resonant elements in cluster form. ... but these dimensions have not been ...
    (rec.radio.amateur.antenna)
  • RE: Mass Adding Comments
    ... insert code to fill your own array as desired at the beginning of the ... 'Determine number of dimensions in array using Chip Pearson's method ... ' Loop, increasing the dimension index Ndx, until an error occurs. ... 'Exit sub if dimensions do not match ...
    (microsoft.public.excel.programming)
  • Re: Convert String -> one-dimensional Array -> two-dimensional Array
    ... you dont need ReDim until you have to REsize it. ... and since you cant REsize it until its created in the first place.... ... Array and fill a two-dimensional Array? ... I just know number of dimensions. ...
    (microsoft.public.scripting.vbscript)

Loading