Navigation

Operators and Keywords

Function List:

C++ API

ov-base.cc File Reference

#include <climits>
#include <iostream>
#include "lo-ieee.h"
#include "lo-mappers.h"
#include "defun.h"
#include "gripes.h"
#include "oct-map.h"
#include "oct-obj.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 "utils.h"
#include "variables.h"
Include dependency graph for ov-base.cc:

Defines

#define INT_CONV_METHOD(T, F, MIN_LIMIT, MAX_LIMIT)

Functions

builtin_type_t btyp_mixed_numeric (builtin_type_t x, builtin_type_t y)
string_vector get_builtin_classes (void)
 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_base_value,"<unknown type>","unknown")
 CONVDECLX (matrix_conv)
 CONVDECLX (complex_matrix_conv)
 CONVDECLX (string_conv)
 CONVDECLX (cell_conv)
void install_base_type_conversions (void)
 DEFUN (sparse_auto_mutate, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} sparse_auto_mutate ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} sparse_auto_mutate (@var{new_val})\n\ Query or set the internal variable that controls whether Octave will\n\ automatically mutate sparse matrices to real matrices to save memory.\n\ For example:\n\ \n\ @example\n\ @group\n\ s = speye(3);\n\ sparse_auto_mutate (false)\n\ s (:, 1) = 1;\n\ typeinfo (s)\n\ @result{} sparse matrix\n\ sparse_auto_mutate (true)\n\ s (1, :) = 1;\n\ typeinfo (s)\n\ @result{} matrix\n\ @end group\n\ @end example\n\ @end deftypefn")

Variables

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

Define Documentation

#define INT_CONV_METHOD (   T,
  F,
  MIN_LIMIT,
  MAX_LIMIT 
)
Value:
T \
  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 < MIN_LIMIT) \
          retval = MIN_LIMIT; \
        else if (d > MAX_LIMIT) \
          retval = MAX_LIMIT; \
        else \
          retval = static_cast<T> (::fix (d));  \
      } \
    else \
      gripe_wrong_type_arg ("octave_base_value::" #F "_value ()", \
                            type_name ()); \
 \
    return retval; \
  }

Function Documentation

builtin_type_t btyp_mixed_numeric ( builtin_type_t  x,
builtin_type_t  y 
)
CONVDECLX ( complex_matrix_conv   ) 
CONVDECLX ( string_conv   ) 
CONVDECLX ( cell_conv   ) 
CONVDECLX ( matrix_conv   ) 
DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA ( octave_base_value  ,
"<unknown type>"  ,
"unknown"   
)
DEFUN ( sparse_auto_mutate  ,
args  ,
nargout   
)
string_vector get_builtin_classes ( void   ) 
void install_base_type_conversions ( void   ) 

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"
}
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines