help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: size of NDArrays


From: John W. Eaton
Subject: Re: size of NDArrays
Date: Mon, 11 Aug 2008 15:13:05 -0400

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]