size of NDArrays
John W. Eaton
jwe at bevo.che.wisc.edu
Mon Aug 11 14:13:05 CDT 2008
On 11-Aug-2008, Thomas L. Scofield wrote:
| Oops. m.ndims () is what I meant.
|
| Anyway, your response tells me just what I needed to know.
| Heretofore I have assumed a dim_vector could have length 1, 2 or 3
| only, and that after that one had to use an Array<octave_idx>.
|
| Can I safely assume that a dim_vector is simply an Array<octave_idx>,
| but that there are constructors for dim_vector only in the cases
| where lengths are 1, 2 or 3?
No, dim_vector is a separate class, not derived from Array<T>. Look
at liboctave/dim-vector.h to see the definition and available methods.
Yes, the Array classes have some special cases for 2 and 3 dimensional
objects just for convenience as those are the most common cases.
All objects in Octave should have at least two dimensions.
jwe
More information about the Help-octave
mailing list