GNU Octave  4.0.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
Macros | Functions | Variables
ov-base.cc File Reference
#include <iostream>
#include <limits>
#include "lo-ieee.h"
#include "lo-mappers.h"
#include "defun.h"
#include "gripes.h"
#include "mxarray.h"
#include "oct-map.h"
#include "oct-obj.h"
#include "oct-hdf5.h"
#include "oct-lvalue.h"
#include "oct-stream.h"
#include "ops.h"
#include "ov-base.h"
#include "ov-cell.h"
#include "ov-ch-mat.h"
#include "ov-complex.h"
#include "ov-cx-mat.h"
#include "ov-range.h"
#include "ov-re-mat.h"
#include "ov-scalar.h"
#include "ov-str-mat.h"
#include "ov-fcn-handle.h"
#include "parse.h"
#include "pr-output.h"
#include "utils.h"
#include "toplev.h"
#include "variables.h"
Include dependency graph for ov-base.cc:

Go to the source code of this file.

Macros

#define INT_CONV_METHOD(T, F)
 

Functions

builtin_type_t btyp_mixed_numeric (builtin_type_t x, builtin_type_t y)
 
bool called_from_builtin (void)
 
OCTAVE_EXPORT octave_value_list Fsparse_auto_mutate (const octave_value_list &args, int nargout)
 
string_vector get_builtin_classes (void)
 
static void gripe_assign_conversion_failed (const std::string &tn1, const std::string &tn2)
 
static void gripe_indexed_assignment (const std::string &tn1, const std::string &tn2)
 
static void gripe_no_conversion (const std::string &on, const std::string &tn1, const std::string &tn2)
 
void install_base_type_conversions (void)
 
octave_value make_idx_args (const std::string &type, const std::list< octave_value_list > &idx, const std::string &who)
 
static octave_base_valueoct_conv_cell_conv (const octave_base_value &)
 
static octave_base_valueoct_conv_complex_matrix_conv (const octave_base_value &)
 
static octave_base_valueoct_conv_matrix_conv (const octave_base_value &)
 
static octave_base_valueoct_conv_string_conv (const octave_base_value &)
 
static octave_value_list sanitize (const octave_value_list &ovl)
 

Variables

std::string btyp_class_name [btyp_num_types]
 
bool Vsparse_auto_mutate = false
 

Macro Definition Documentation

#define INT_CONV_METHOD (   T,
  F 
)
Value:
octave_base_value::F ## _value (bool require_int, bool frc_str_conv) const \
{ \
T retval = 0; \
\
double d = double_value (frc_str_conv); \
\
if (! error_state) \
{ \
if (require_int && D_NINT (d) != d) \
error_with_cfn ("conversion of %g to " #T " value failed", d); \
else if (d < std::numeric_limits<T>::min ()) \
else if (d > std::numeric_limits<T>::max ()) \
else \
retval = static_cast<T> (::fix (d)); \
} \
gripe_wrong_type_arg ("octave_base_value::" #F "_value ()", \
type_name ()); \
\
return retval; \
}
void gripe_wrong_type_arg(const char *name, const char *s, bool is_error)
Definition: gripes.cc:135
F77_RET_T const double const double double * d
void error_with_cfn(const char *fmt,...)
Definition: error.cc:491
int error_state
Definition: error.cc:101
OCTAVE_API double D_NINT(double x)
Definition: lo-mappers.h:240
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:233
double fix(double x)
Definition: lo-mappers.h:39
charNDArray min(char d, const charNDArray &m)
Definition: chNDArray.cc:210
void F(const TSRC *v, TRES *r, octave_idx_type m, octave_idx_type n)
Definition: mx-inlines.cc:527

Definition at line 455 of file ov-base.cc.

Function Documentation

builtin_type_t btyp_mixed_numeric ( builtin_type_t  x,
builtin_type_t  y 
)
bool called_from_builtin ( void  )
OCTAVE_EXPORT octave_value_list Fsparse_auto_mutate ( const octave_value_list args,
int  nargout 
)

Definition at line 1707 of file ov-base.cc.

References SET_INTERNAL_VARIABLE.

string_vector get_builtin_classes ( void  )
static void gripe_assign_conversion_failed ( const std::string &  tn1,
const std::string &  tn2 
)
static

Definition at line 1312 of file ov-base.cc.

References error().

Referenced by octave_base_value::numeric_assign().

static void gripe_indexed_assignment ( const std::string &  tn1,
const std::string &  tn2 
)
static

Definition at line 1305 of file ov-base.cc.

References error().

Referenced by octave_base_value::numeric_assign().

static void gripe_no_conversion ( const std::string &  on,
const std::string &  tn1,
const std::string &  tn2 
)
static

Definition at line 1320 of file ov-base.cc.

References error().

Referenced by octave_base_value::numeric_assign().

void install_base_type_conversions ( void  )

Definition at line 1661 of file ov-base.cc.

References INSTALL_ASSIGNCONV, and INSTALL_WIDENOP.

Referenced by install_ops().

octave_value make_idx_args ( const std::string &  type,
const std::list< octave_value_list > &  idx,
const std::string &  who 
)
static octave_base_value* oct_conv_cell_conv ( const octave_base_value )
static

Definition at line 1550 of file ov-base.cc.

static octave_base_value* oct_conv_complex_matrix_conv ( const octave_base_value )
static

Definition at line 1540 of file ov-base.cc.

static octave_base_value* oct_conv_matrix_conv ( const octave_base_value )
static

Definition at line 1535 of file ov-base.cc.

static octave_base_value* oct_conv_string_conv ( const octave_base_value )
static

Definition at line 1545 of file ov-base.cc.

static octave_value_list sanitize ( const octave_value_list ovl)
inlinestatic

Definition at line 1556 of file ov-base.cc.

References octave_value_list::length(), and ovl().

Referenced by make_idx_args().

Variable Documentation

std::string btyp_class_name[btyp_num_types]
Initial value:
=
{
"double", "single", "double", "single",
"int8", "int16", "int32", "int64",
"uint8", "uint16", "uint32", "uint64",
"logical", "char",
"struct", "cell", "function_handle"
}

Definition at line 83 of file ov-base.cc.

Referenced by get_builtin_classes(), get_dispatch_type(), and make_fcn_handle().

bool Vsparse_auto_mutate = false