[Changeset]: octave_value(const ArrayN<octave_idx_type>&) constructor
John W. Eaton
jwe at bevo.che.wisc.edu
Thu Jul 10 13:06:19 CDT 2008
On 30-Jun-2008, David Bateman wrote:
| John W. Eaton wrote:
| > On 26-Jun-2008, David Bateman wrote:
| >
| > | consider the attached changeset instead.
| >
| > It seems odd to me that the octave_value constructor that takes an
| > Array<octave_idx_type> value would convert it to NDArray internally
| > instead of storing it as an Array<octave_idx_type>. The other
| > conversions also seem odd, but I guess we already have a few other
| > constructors that have similar options. What about defining
| > Array<octave_idx_type> to NDArray conversion with the options and then
| > using the existing octave_value (const NDArray&) constructor instead?
| > It seems to me that this approach might cause less trouble later if we
| > decided we wanted an actual Array<octave_idx_type> value in the
| > octave_value hierarchy.
| >
| > jwe
| >
| Ok, then here is take 3.
I applied it, but removed the function
NDArray (const ArrayN<octave_idx_type>& a, bool zero_based = false,
bool negative_to_nan = false);
since ArrayN is derived from Array, so I think we only need the
version that takes an Array argument.
Thanks,
jwe
More information about the Octave-maintainers
mailing list