You can either calculate the total nr of elements and access them one
by one, or recursively iterate over all dimensions.
Either way, you'll probably need dims() , Array<int> and elem().
David Bateman will be able to give you good best advice on this one.
Regards
Stefan
On Wed, May 25, 2005 at 10:34:26AM +0200, S?ren Hauberg wrote:
Hi
Again in C++, is there an easy way to iterate over all the elements of
an ND matrix (ArrayN)?
/Søren
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------