GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Macros | Functions
ov.h File Reference
#include <cstdlib>
#include <iosfwd>
#include <string>
#include <list>
#include "Range.h"
#include "data-conv.h"
#include "idx-vector.h"
#include "mach-info.h"
#include "mx-base.h"
#include "oct-alloc.h"
#include "oct-time.h"
#include "str-vec.h"
#include "oct-hdf5.h"
#include "oct-sort.h"
#include "ov-base.h"
Include dependency graph for ov.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  octave_value

Macros

#define DEF_DUMMY_VALUE_EXTRACTOR(VALUE, DEFVAL)
#define DEF_VALUE_EXTRACTOR(VALUE, MPREFIX)
#define MAPPER_FORWARD(F)   octave_value F (void) const { return rep->map (octave_base_value::umap_ ## F); }
#define OV_BINOP_FN(name)
#define OV_BINOP_FN_OP(name, op)
#define OV_BINOP_OP(name, op)
#define OV_COMP_BINOP_FN(name)
#define OV_REP_TYPE   octave_base_value
#define OV_UNOP_FN(name)
#define OV_UNOP_FN_OP(name, op)
#define OV_UNOP_OP(name, op)

Functions

OCTINTERP_API octave_value do_binary_op (octave_value::binary_op op, const octave_value &a, const octave_value &b)
OCTINTERP_API octave_value do_binary_op (octave_value::compound_binary_op op, const octave_value &a, const octave_value &b)
OCTINTERP_API octave_value do_unary_op (octave_value::unary_op op, const octave_value &a)
OCTINTERP_API void install_types (void)
template<class Value >
Value octave_value_extract (const octave_value &)
template<>
bool octave_value_extract< bool > (const octave_value &v)
template<>
boolMatrix octave_value_extract< boolMatrix > (const octave_value &v)
template<>
boolNDArray octave_value_extract< boolNDArray > (const octave_value &v)
template<>
char octave_value_extract< char > (const octave_value &)
template<>
charNDArray octave_value_extract< charNDArray > (const octave_value &v)
template<>
ColumnVector octave_value_extract< ColumnVector > (const octave_value &v)
template<>
Complex octave_value_extract< Complex > (const octave_value &v)
template<>
ComplexColumnVector octave_value_extract< ComplexColumnVector > (const octave_value &v)
template<>
ComplexDiagMatrix octave_value_extract< ComplexDiagMatrix > (const octave_value &v)
template<>
ComplexMatrix octave_value_extract< ComplexMatrix > (const octave_value &v)
template<>
ComplexNDArray octave_value_extract< ComplexNDArray > (const octave_value &v)
template<>
ComplexRowVector octave_value_extract< ComplexRowVector > (const octave_value &v)
template<>
DiagMatrix octave_value_extract< DiagMatrix > (const octave_value &v)
template<>
double octave_value_extract< double > (const octave_value &v)
template<>
float octave_value_extract< float > (const octave_value &v)
template<>
FloatColumnVector octave_value_extract< FloatColumnVector > (const octave_value &v)
template<>
FloatComplex octave_value_extract< FloatComplex > (const octave_value &v)
template<>
FloatComplexColumnVector octave_value_extract< FloatComplexColumnVector > (const octave_value &v)
template<>
FloatComplexDiagMatrix octave_value_extract< FloatComplexDiagMatrix > (const octave_value &v)
template<>
FloatComplexMatrix octave_value_extract< FloatComplexMatrix > (const octave_value &v)
template<>
FloatComplexNDArray octave_value_extract< FloatComplexNDArray > (const octave_value &v)
template<>
FloatComplexRowVector octave_value_extract< FloatComplexRowVector > (const octave_value &v)
template<>
FloatDiagMatrix octave_value_extract< FloatDiagMatrix > (const octave_value &v)
template<>
FloatMatrix octave_value_extract< FloatMatrix > (const octave_value &v)
template<>
FloatNDArray octave_value_extract< FloatNDArray > (const octave_value &v)
template<>
FloatRowVector octave_value_extract< FloatRowVector > (const octave_value &v)
template<>
int16NDArray octave_value_extract< int16NDArray > (const octave_value &v)
template<>
int32NDArray octave_value_extract< int32NDArray > (const octave_value &v)
template<>
int64NDArray octave_value_extract< int64NDArray > (const octave_value &v)
template<>
int8NDArray octave_value_extract< int8NDArray > (const octave_value &v)
template<>
Matrix octave_value_extract< Matrix > (const octave_value &v)
template<>
NDArray octave_value_extract< NDArray > (const octave_value &v)
template<>
octave_int16 octave_value_extract< octave_int16 > (const octave_value &v)
template<>
octave_int32 octave_value_extract< octave_int32 > (const octave_value &v)
template<>
octave_int64 octave_value_extract< octave_int64 > (const octave_value &v)
template<>
octave_int8 octave_value_extract< octave_int8 > (const octave_value &v)
template<>
octave_uint16 octave_value_extract< octave_uint16 > (const octave_value &v)
template<>
octave_uint32 octave_value_extract< octave_uint32 > (const octave_value &v)
template<>
octave_uint64 octave_value_extract< octave_uint64 > (const octave_value &v)
template<>
octave_uint8 octave_value_extract< octave_uint8 > (const octave_value &v)
template<>
octave_value octave_value_extract< octave_value > (const octave_value &)
template<>
PermMatrix octave_value_extract< PermMatrix > (const octave_value &v)
template<>
RowVector octave_value_extract< RowVector > (const octave_value &v)
template<>
SparseBoolMatrix octave_value_extract< SparseBoolMatrix > (const octave_value &v)
template<>
SparseComplexMatrix octave_value_extract< SparseComplexMatrix > (const octave_value &v)
template<>
SparseMatrix octave_value_extract< SparseMatrix > (const octave_value &v)
template<>
uint16NDArray octave_value_extract< uint16NDArray > (const octave_value &v)
template<>
uint32NDArray octave_value_extract< uint32NDArray > (const octave_value &v)
template<>
uint64NDArray octave_value_extract< uint64NDArray > (const octave_value &v)
template<>
uint8NDArray octave_value_extract< uint8NDArray > (const octave_value &v)
octave_value op_add (const octave_value &a1, const octave_value &a2)
octave_value op_div (const octave_value &a1, const octave_value &a2)
octave_value op_el_and (const octave_value &a1, const octave_value &a2)
octave_value op_el_div (const octave_value &a1, const octave_value &a2)
octave_value op_el_ldiv (const octave_value &a1, const octave_value &a2)
octave_value op_el_mul (const octave_value &a1, const octave_value &a2)
octave_value op_el_or (const octave_value &a1, const octave_value &a2)
octave_value op_el_pow (const octave_value &a1, const octave_value &a2)
octave_value op_eq (const octave_value &a1, const octave_value &a2)
octave_value op_ge (const octave_value &a1, const octave_value &a2)
octave_value op_gt (const octave_value &a1, const octave_value &a2)
octave_value op_herm_mul (const octave_value &a1, const octave_value &a2)
octave_value op_hermitian (const octave_value &a)
octave_value op_ldiv (const octave_value &a1, const octave_value &a2)
octave_value op_le (const octave_value &a1, const octave_value &a2)
octave_value op_lshift (const octave_value &a1, const octave_value &a2)
octave_value op_lt (const octave_value &a1, const octave_value &a2)
octave_value op_mul (const octave_value &a1, const octave_value &a2)
octave_value op_mul_herm (const octave_value &a1, const octave_value &a2)
octave_value op_mul_trans (const octave_value &a1, const octave_value &a2)
octave_value op_ne (const octave_value &a1, const octave_value &a2)
octave_value op_not (const octave_value &a)
octave_value op_pow (const octave_value &a1, const octave_value &a2)
octave_value op_rshift (const octave_value &a1, const octave_value &a2)
octave_value op_struct_ref (const octave_value &a1, const octave_value &a2)
octave_value op_sub (const octave_value &a1, const octave_value &a2)
octave_value op_trans_mul (const octave_value &a1, const octave_value &a2)
octave_value op_transpose (const octave_value &a)
octave_value op_uminus (const octave_value &a)
octave_value op_uplus (const octave_value &a)
octave_value operator! (const octave_value &a)
octave_value operator!= (const octave_value &a1, const octave_value &a2)
octave_value operator* (const octave_value &a1, const octave_value &a2)
octave_value operator+ (const octave_value &a)
octave_value operator+ (const octave_value &a1, const octave_value &a2)
octave_value operator- (const octave_value &a)
octave_value operator- (const octave_value &a1, const octave_value &a2)
octave_value operator/ (const octave_value &a1, const octave_value &a2)
octave_value operator< (const octave_value &a1, const octave_value &a2)
octave_value operator<= (const octave_value &a1, const octave_value &a2)
octave_value operator== (const octave_value &a1, const octave_value &a2)
octave_value operator> (const octave_value &a1, const octave_value &a2)
octave_value operator>= (const octave_value &a1, const octave_value &a2)

Macro Definition Documentation

#define DEF_DUMMY_VALUE_EXTRACTOR (   VALUE,
  DEFVAL 
)
Value:
template<> \
inline VALUE octave_value_extract<VALUE> (const octave_value&) \
{ assert (false); return DEFVAL; }

Definition at line 1415 of file ov.h.

#define DEF_VALUE_EXTRACTOR (   VALUE,
  MPREFIX 
)
Value:
template<> \
inline VALUE octave_value_extract<VALUE> (const octave_value& v) \
{ return v.MPREFIX ## _value (); }

Definition at line 1351 of file ov.h.

#define MAPPER_FORWARD (   F)    octave_value F (void) const { return rep->map (octave_base_value::umap_ ## F); }

Definition at line 1131 of file ov.h.

#define OV_BINOP_FN (   name)
Value:
inline octave_value \
name (const octave_value& a1, const octave_value& a2) \
{ \
return do_binary_op (octave_value::name, a1, a2); \
}

Definition at line 1282 of file ov.h.

#define OV_BINOP_FN_OP (   name,
  op 
)
Value:
OV_BINOP_FN (name) \
OV_BINOP_OP (name, op)

Definition at line 1296 of file ov.h.

#define OV_BINOP_OP (   name,
  op 
)
Value:
inline octave_value \
operator op (const octave_value& a1, const octave_value& a2) \
{ \
return name (a1, a2); \
}

Definition at line 1289 of file ov.h.

#define OV_COMP_BINOP_FN (   name)
Value:
inline octave_value \
name (const octave_value& a1, const octave_value& a2) \
{ \
return do_binary_op (octave_value::name, a1, a2); \
}

Definition at line 1326 of file ov.h.

#define OV_REP_TYPE   octave_base_value

Definition at line 1344 of file ov.h.

#define OV_UNOP_FN (   name)
Value:
inline octave_value \
name (const octave_value& a) \
{ \
return do_unary_op (octave_value::name, a); \
}

Definition at line 1252 of file ov.h.

#define OV_UNOP_FN_OP (   name,
  op 
)
Value:
OV_UNOP_FN (name) \
OV_UNOP_OP (name, op)

Definition at line 1266 of file ov.h.

#define OV_UNOP_OP (   name,
  op 
)
Value:
inline octave_value \
operator op (const octave_value& a) \
{ \
return name (a); \
}

Definition at line 1259 of file ov.h.

Function Documentation

OCTINTERP_API octave_value do_binary_op ( octave_value::binary_op  op,
const octave_value a,
const octave_value b 
)
OCTINTERP_API octave_value do_binary_op ( octave_value::compound_binary_op  op,
const octave_value a,
const octave_value b 
)
OCTINTERP_API octave_value do_unary_op ( octave_value::unary_op  op,
const octave_value a 
)
OCTINTERP_API void install_types ( void  )

Definition at line 2731 of file ov.cc.

References octave_null_matrix::register_type(), octave_magic_colon::register_type(), octave_null_str::register_type(), octave_cs_list::register_type(), octave_float_complex_diag_matrix::register_type(), octave_float_diag_matrix::register_type(), octave_complex_diag_matrix::register_type(), octave_oncleanup::register_type(), octave_diag_matrix::register_type(), octave_fcn_inline::register_type(), octave_null_sq_str::register_type(), octave_dld_function::register_type(), octave_builtin::register_type(), octave_sparse_bool_matrix::register_type(), octave_sparse_complex_matrix::register_type(), octave_sparse_matrix::register_type(), octave_struct::register_type(), octave_fcn_handle::register_type(), octave_char_matrix_str::register_type(), octave_float_complex_matrix::register_type(), octave_complex_matrix::register_type(), octave_cell::register_type(), octave_float_complex::register_type(), octave_complex::register_type(), octave_float_matrix::register_type(), octave_class::register_type(), octave_perm_matrix::register_type(), octave_bool_matrix::register_type(), octave_matrix::register_type(), octave_lazy_index::register_type(), octave_bool::register_type(), octave_scalar::register_type(), octave_float_scalar::register_type(), octave_char_matrix_sq_str::register_type(), octave_scalar_struct::register_type(), octave_java::register_type(), octave_range::register_type(), octave_user_function::register_type(), and octave_base_value::register_type().

Referenced by octave_initialize_interpreter().

template<class Value >
Value octave_value_extract ( const octave_value )
inline

Definition at line 1348 of file ov.h.

template<>
bool octave_value_extract< bool > ( const octave_value v)
inline

Definition at line 1360 of file ov.h.

template<>
boolMatrix octave_value_extract< boolMatrix > ( const octave_value v)
inline

Definition at line 1392 of file ov.h.

template<>
boolNDArray octave_value_extract< boolNDArray > ( const octave_value v)
inline

Definition at line 1376 of file ov.h.

template<>
char octave_value_extract< char > ( const octave_value )
inline

Definition at line 1420 of file ov.h.

Referenced by do_minmax_bin_op< charNDArray >().

template<>
charNDArray octave_value_extract< charNDArray > ( const octave_value v)
inline

Definition at line 1378 of file ov.h.

Referenced by do_minmax_bin_op< charNDArray >(), and do_minmax_red_op< charNDArray >().

template<>
ColumnVector octave_value_extract< ColumnVector > ( const octave_value v)
inline

Definition at line 1394 of file ov.h.

template<>
Complex octave_value_extract< Complex > ( const octave_value v)
inline

Definition at line 1358 of file ov.h.

Definition at line 1396 of file ov.h.

Definition at line 1406 of file ov.h.

template<>
ComplexMatrix octave_value_extract< ComplexMatrix > ( const octave_value v)
inline

Definition at line 1390 of file ov.h.

Referenced by do_sqrtm().

template<>
ComplexNDArray octave_value_extract< ComplexNDArray > ( const octave_value v)
inline

Definition at line 1374 of file ov.h.

Definition at line 1401 of file ov.h.

template<>
DiagMatrix octave_value_extract< DiagMatrix > ( const octave_value v)
inline

Definition at line 1404 of file ov.h.

template<>
double octave_value_extract< double > ( const octave_value v)
inline

Definition at line 1356 of file ov.h.

template<>
float octave_value_extract< float > ( const octave_value v)
inline

Definition at line 1357 of file ov.h.

Definition at line 1395 of file ov.h.

template<>
FloatComplex octave_value_extract< FloatComplex > ( const octave_value v)
inline

Definition at line 1359 of file ov.h.

Definition at line 1397 of file ov.h.

Definition at line 1407 of file ov.h.

Definition at line 1391 of file ov.h.

Definition at line 1375 of file ov.h.

Definition at line 1402 of file ov.h.

Definition at line 1405 of file ov.h.

template<>
FloatMatrix octave_value_extract< FloatMatrix > ( const octave_value v)
inline

Definition at line 1389 of file ov.h.

template<>
FloatNDArray octave_value_extract< FloatNDArray > ( const octave_value v)
inline

Definition at line 1373 of file ov.h.

Referenced by elem_xpow().

template<>
FloatRowVector octave_value_extract< FloatRowVector > ( const octave_value v)
inline

Definition at line 1400 of file ov.h.

template<>
int16NDArray octave_value_extract< int16NDArray > ( const octave_value v)
inline

Definition at line 1380 of file ov.h.

template<>
int32NDArray octave_value_extract< int32NDArray > ( const octave_value v)
inline

Definition at line 1381 of file ov.h.

template<>
int64NDArray octave_value_extract< int64NDArray > ( const octave_value v)
inline

Definition at line 1382 of file ov.h.

template<>
int8NDArray octave_value_extract< int8NDArray > ( const octave_value v)
inline

Definition at line 1379 of file ov.h.

template<>
Matrix octave_value_extract< Matrix > ( const octave_value v)
inline

Definition at line 1388 of file ov.h.

Referenced by do_sqrtm().

template<>
NDArray octave_value_extract< NDArray > ( const octave_value v)
inline

Definition at line 1372 of file ov.h.

Referenced by elem_xpow().

template<>
octave_int16 octave_value_extract< octave_int16 > ( const octave_value v)
inline

Definition at line 1363 of file ov.h.

template<>
octave_int32 octave_value_extract< octave_int32 > ( const octave_value v)
inline

Definition at line 1364 of file ov.h.

template<>
octave_int64 octave_value_extract< octave_int64 > ( const octave_value v)
inline

Definition at line 1365 of file ov.h.

template<>
octave_int8 octave_value_extract< octave_int8 > ( const octave_value v)
inline

Definition at line 1362 of file ov.h.

template<>
octave_uint16 octave_value_extract< octave_uint16 > ( const octave_value v)
inline

Definition at line 1367 of file ov.h.

template<>
octave_uint32 octave_value_extract< octave_uint32 > ( const octave_value v)
inline

Definition at line 1368 of file ov.h.

template<>
octave_uint64 octave_value_extract< octave_uint64 > ( const octave_value v)
inline

Definition at line 1369 of file ov.h.

template<>
octave_uint8 octave_value_extract< octave_uint8 > ( const octave_value v)
inline

Definition at line 1366 of file ov.h.

template<>
octave_value octave_value_extract< octave_value > ( const octave_value )
inline

Definition at line 1421 of file ov.h.

template<>
PermMatrix octave_value_extract< PermMatrix > ( const octave_value v)
inline

Definition at line 1408 of file ov.h.

template<>
RowVector octave_value_extract< RowVector > ( const octave_value v)
inline

Definition at line 1399 of file ov.h.

Definition at line 1412 of file ov.h.

Definition at line 1411 of file ov.h.

template<>
SparseMatrix octave_value_extract< SparseMatrix > ( const octave_value v)
inline

Definition at line 1410 of file ov.h.

template<>
uint16NDArray octave_value_extract< uint16NDArray > ( const octave_value v)
inline

Definition at line 1384 of file ov.h.

template<>
uint32NDArray octave_value_extract< uint32NDArray > ( const octave_value v)
inline

Definition at line 1385 of file ov.h.

template<>
uint64NDArray octave_value_extract< uint64NDArray > ( const octave_value v)
inline

Definition at line 1386 of file ov.h.

template<>
uint8NDArray octave_value_extract< uint8NDArray > ( const octave_value v)
inline

Definition at line 1383 of file ov.h.

octave_value op_add ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_div ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_el_and ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_el_div ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_el_ldiv ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_el_mul ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_el_or ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_el_pow ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_eq ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_ge ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_gt ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_herm_mul ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_hermitian ( const octave_value a)
inline
octave_value op_ldiv ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_le ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_lshift ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1307 of file ov.h.

octave_value op_lt ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_mul ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_mul_herm ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_mul_trans ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_ne ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_not ( const octave_value a)
inline
octave_value op_pow ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_rshift ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1308 of file ov.h.

octave_value op_struct_ref ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1324 of file ov.h.

octave_value op_sub ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_trans_mul ( const octave_value a1,
const octave_value a2 
)
inline
octave_value op_transpose ( const octave_value a)
inline
octave_value op_uminus ( const octave_value a)
inline
octave_value op_uplus ( const octave_value a)
inline
octave_value operator! ( const octave_value a)
inline

Definition at line 1270 of file ov.h.

octave_value operator!= ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1315 of file ov.h.

octave_value operator* ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1302 of file ov.h.

octave_value operator+ ( const octave_value a)
inline

Definition at line 1271 of file ov.h.

octave_value operator+ ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1300 of file ov.h.

octave_value operator- ( const octave_value a)
inline

Definition at line 1272 of file ov.h.

octave_value operator- ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1301 of file ov.h.

octave_value operator/ ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1303 of file ov.h.

octave_value operator< ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1310 of file ov.h.

octave_value operator<= ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1311 of file ov.h.

octave_value operator== ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1312 of file ov.h.

octave_value operator> ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1314 of file ov.h.

octave_value operator>= ( const octave_value a1,
const octave_value a2 
)
inline

Definition at line 1313 of file ov.h.