1 /*
2 Copyright 2018 Oliver Heimlich
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, see <http://www.gnu.org/licenses/>.
16 */
17
18 // Implementation for Octave version 4.2 and older.
19
20 #include <octave/oct.h>
21 #include <octave/parse.h>
22
23 // The is_vector method has been replaced by isvector in Octave 4.4.
isvector(const Array<double> x)24 bool isvector (const Array <double> x)
25 {
26 return x.is_vector ();
27 }
28
29 // The is_empty method has been replaced by isempty in Octave 4.4.
isempty(const octave_value x)30 bool isempty (const octave_value x)
31 {
32 return x.is_empty ();
33 }
34
35 // feval has been moved into octave::feval in Octave 4.4.
36 namespace octave
37 {
feval(const std::string & name,const octave_value_list & args=octave_value_list (),int nargout=0)38 octave_value_list feval
39 (
40 const std::string &name,
41 const octave_value_list &args = octave_value_list (),
42 int nargout = 0
43 )
44 {
45 return ::feval (name, args, nargout);
46 }
47 }
48