[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Iterating over a ND-array
From: |
Stefan van der Walt |
Subject: |
Re: Iterating over a ND-array |
Date: |
Wed, 25 May 2005 18:25:50 +0200 |
User-agent: |
Mutt/1.5.6+20040907i |
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
-------------------------------------------------------------