help-octave
[Top][All Lists]
Advanced

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

Cannot return an Array3


From: Søren Hauberg
Subject: Cannot return an Array3
Date: Thu, 16 Jun 2005 16:46:35 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050404)

Hi
I was doing some work using octave 2.1.71 on linux in C++ where I tried to return an Array3 to the octave prompt. This failed since there doesn't appear to be an octave_value constructor for Array3. Is this a bug or a feature? (It's not a big deal since I can just use ArrayN instead, but I thought I'd better ask)

Here's my code:

#include <octave/oct.h>
#include <octave/Array3.h>

DEFUN_DLD(test, args, nargout,"")
{
    Array3<double> a3(3,3,3);
    return octave_value(a3);
}


And here's the error message I get from mkoctfile:

test.cc: In function `octave_value_list Ftest(const octave_value_list&, int)':
test.cc:9: error: call of overloaded `octave_value(Array3<double>&)' is
   ambiguous
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:229: error: candidates are:
   octave_value::octave_value(const octave_uint64&)
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:228: error:
   octave_value::octave_value(const octave_uint32&)
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:227: error:
   octave_value::octave_value(const octave_uint16&)
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:226: error:
   octave_value::octave_value(const octave_uint8&)
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:225: error:
   octave_value::octave_value(const octave_int64&)
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:224: error:
   octave_value::octave_value(const octave_int32&)
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:223: error:
   octave_value::octave_value(const octave_int16&)
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:222: error:
   octave_value::octave_value(const octave_int8&)
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:221: error:
   octave_value::octave_value(const ArrayN<char>&, bool)
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:208: error:
   octave_value::octave_value(const ArrayN<Complex>&)
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:201: error:
   octave_value::octave_value(const ArrayN<double>&)
/tmp/hauberg/include/octave-2.1.71/octave/ov.h:197: error:
   octave_value::octave_value(const ArrayN<octave_value>&, bool)


/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
-------------------------------------------------------------



reply via email to

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