Functions

ov.cc File Reference

#include "data-conv.h"
#include "quit.h"
#include "str-vec.h"
#include "oct-obj.h"
#include "oct-stream.h"
#include "ov.h"
#include "ov-base.h"
#include "ov-bool.h"
#include "ov-bool-mat.h"
#include "ov-cell.h"
#include "ov-scalar.h"
#include "ov-float.h"
#include "ov-re-mat.h"
#include "ov-flt-re-mat.h"
#include "ov-re-diag.h"
#include "ov-flt-re-diag.h"
#include "ov-perm.h"
#include "ov-bool-sparse.h"
#include "ov-cx-sparse.h"
#include "ov-re-sparse.h"
#include "ov-int8.h"
#include "ov-int16.h"
#include "ov-int32.h"
#include "ov-int64.h"
#include "ov-uint8.h"
#include "ov-uint16.h"
#include "ov-uint32.h"
#include "ov-uint64.h"
#include "ov-complex.h"
#include "ov-flt-complex.h"
#include "ov-cx-mat.h"
#include "ov-flt-cx-mat.h"
#include "ov-cx-diag.h"
#include "ov-flt-cx-diag.h"
#include "ov-ch-mat.h"
#include "ov-str-mat.h"
#include "ov-range.h"
#include "ov-struct.h"
#include "ov-class.h"
#include "ov-oncleanup.h"
#include "ov-cs-list.h"
#include "ov-colon.h"
#include "ov-builtin.h"
#include "ov-dld-fcn.h"
#include "ov-usr-fcn.h"
#include "ov-fcn-handle.h"
#include "ov-fcn-inline.h"
#include "ov-typeinfo.h"
#include "ov-null-mat.h"
#include "ov-lazy-idx.h"
#include "defun.h"
#include "error.h"
#include "gripes.h"
#include "pager.h"
#include "parse.h"
#include "pr-output.h"
#include "symtab.h"
#include "utils.h"
#include "variables.h"

Go to the source code of this file.

Functions

template<class T >
static Array< intconvert_to_int_array (const Array< octave_int< T > > &A)
template<class T >
static Array< octave_idx_typeconvert_to_octave_idx_type_array (const Array< octave_int< T > > &A)
static void decode_subscripts (const char *name, const octave_value &arg, std::string &type_string, std::list< octave_value_list > &idx)
static octave_value decompose_binary_op (octave_value::compound_binary_op op, const octave_value &v1, const octave_value &v2)
 DEFINE_OCTAVE_ALLOCATOR2 (octave_value, 1024)
 DEFUN (is_sq_string, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} is_sq_string (@var{x})\n\ Return true if @var{x} is a single-quoted character string.\n\ @seealso{is_dq_string, ischar}\n\ @end deftypefn")
 DEFUN (sizeof, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} sizeof (@var{val})\n\ Return the size of @var{val} in bytes.\n\ @seealso{whos}\n\ @end deftypefn")
 DEFUN (subsref, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} subsref (@var{val}, @var{idx})\n\ Perform the subscripted element selection operation according to\n\ the subscript specified by @var{idx}.\n\ \n\ The subscript @var{idx} is expected to be a structure array with\n\ fields @samp{type} and @samp{subs}. Valid values for @samp{type}\n\ are @samp{\"()\"}, @samp{\"@{@}\"}, and @samp{\".\"}.\n\ The @samp{subs} field may be either @samp{\":\"} or a cell array\n\ of index values.\n\ \n\ The following example shows how to extract the two first columns of\n\ a matrix\n\ \n\ @example\n\ @group\n\ val = magic(3)\n\ @result{} val = [ 8 1 6\n\ 3 5 7\n\ 4 9 2 ]\n\ idx.type = \"()\";\n\ idx.subs = @{\":\", 1:2@};\n\ subsref(val, idx)\n\ @result{} [ 8 1\n\ 3 5\n\ 4 9 ]\n\ @end group\n\ @end example\n\ \n\ @noindent\n\ Note that this is the same as writing @code{val(:,1:2)}.\n\ \n\ If @var{idx} is an empty structure array with fields @samp{type}\n\ and @samp{subs}, return @var{val}.\n\ @seealso{subsasgn, substruct}\n\ @end deftypefn")
 DEFUN (subsasgn, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} subsasgn (@var{val}, @var{idx}, @var{rhs})\n\ Perform the subscripted assignment operation according to\n\ the subscript specified by @var{idx}.\n\ \n\ The subscript @var{idx} is expected to be a structure array with\n\ fields @samp{type} and @samp{subs}. Valid values for @samp{type}\n\ are @samp{\"()\"}, @samp{\"@{@}\"}, and @samp{\".\"}.\n\ The @samp{subs} field may be either @samp{\":\"} or a cell array\n\ of index values.\n\ \n\ The following example shows how to set the two first columns of a\n\ 3-by-3 matrix to zero.\n\ \n\ @example\n\ @group\n\ val = magic(3);\n\ idx.type = \"()\";\n\ idx.subs = @{\":\", 1:2@};\n\ subsasgn (val, idx, 0)\n\ @result{} [ 0 0 6\n\ 0 0 7\n\ 0 0 2 ]\n\ @end group\n\ @end example\n\ \n\ Note that this is the same as writing @code{val(:,1:2) = 0}.\n\ \n\ If @var{idx} is an empty structure array with fields @samp{type}\n\ and @samp{subs}, return @var{rhs}.\n\ @seealso{subsref, substruct}\n\ @end deftypefn")
 DEFUN (is_dq_string, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} is_dq_string (@var{x})\n\ Return true if @var{x} is a double-quoted character string.\n\ @seealso{is_sq_string, ischar}\n\ @end deftypefn")
octave_value do_binary_op (octave_value::binary_op op, const octave_value &v1, const octave_value &v2)
octave_value do_binary_op (octave_value::compound_binary_op op, const octave_value &v1, const octave_value &v2)
octave_value do_cat_op (const octave_value &v1, const octave_value &v2, const Array< octave_idx_type > &ra_idx)
octave_value do_unary_op (octave_value::unary_op op, const octave_value &v)
static void gripe_assign_failed_or_no_method (const std::string &on, const std::string &tn1, const std::string &tn2)
static void gripe_binary_op (const std::string &on, const std::string &tn1, const std::string &tn2)
static void gripe_binary_op_conv (const std::string &on)
static void gripe_cat_op (const std::string &tn1, const std::string &tn2)
static void gripe_cat_op_conv (void)
static void gripe_unary_op (const std::string &on, const std::string &tn)
static void gripe_unary_op_conv (const std::string &on)
static void gripe_unary_op_conversion_failed (const std::string &op, const std::string &tn)
void install_types (void)
static dim_vector make_vector_dims (const dim_vector &dv, bool force_vector_conversion, const std::string &my_type, const std::string &wanted_type)

Function Documentation

template<class T >
static Array<int> convert_to_int_array ( const Array< octave_int< T > > &  A  )  [static]

Definition at line 1614 of file ov.cc.

References A.

Referenced by octave_value::int_vector_value().

template<class T >
static Array<octave_idx_type> convert_to_octave_idx_type_array ( const Array< octave_int< T > > &  A  )  [static]

Definition at line 1689 of file ov.cc.

References A.

Referenced by octave_value::octave_idx_type_vector_value().

static void decode_subscripts ( const char name,
const octave_value arg,
std::string &  type_string,
std::list< octave_value_list > &  idx 
) [static]
static octave_value decompose_binary_op ( octave_value::compound_binary_op  op,
const octave_value v1,
const octave_value v2 
) [static]
DEFINE_OCTAVE_ALLOCATOR2 ( octave_value  ,
1024   
)
DEFUN ( is_sq_string  ,
args   
)

Definition at line 3019 of file ov.cc.

References octave_value::is_sq_string(), and print_usage().

DEFUN ( sizeof  ,
args   
)

Definition at line 2720 of file ov.cc.

References octave_value::byte_size(), and print_usage().

DEFUN ( subsref  ,
args  ,
nargout   
)

Definition at line 2820 of file ov.cc.

References decode_subscripts(), error_state, print_usage(), and octave_value::subsref().

DEFUN ( subsasgn  ,
args   
)
DEFUN ( is_dq_string  ,
args   
)

Definition at line 3045 of file ov.cc.

References octave_value::is_dq_string(), and print_usage().

octave_value do_binary_op ( octave_value::binary_op  op,
const octave_value v1,
const octave_value v2 
)
octave_value do_binary_op ( octave_value::compound_binary_op  op,
const octave_value v1,
const octave_value v2 
)
octave_value do_cat_op ( const octave_value v1,
const octave_value v2,
const Array< octave_idx_type > &  ra_idx 
)
octave_value do_unary_op ( octave_value::unary_op  op,
const octave_value v 
)
static void gripe_assign_failed_or_no_method ( const std::string &  on,
const std::string &  tn1,
const std::string &  tn2 
) [static]

Definition at line 1313 of file ov.cc.

References error().

Referenced by octave_value::assign().

static void gripe_binary_op ( const std::string &  on,
const std::string &  tn1,
const std::string &  tn2 
) [static]

Definition at line 1872 of file ov.cc.

References error().

Referenced by do_binary_op().

static void gripe_binary_op_conv ( const std::string &  on  )  [static]

Definition at line 1880 of file ov.cc.

References error().

Referenced by do_binary_op().

static void gripe_cat_op ( const std::string &  tn1,
const std::string &  tn2 
) [static]

Definition at line 2185 of file ov.cc.

References error().

Referenced by do_cat_op().

static void gripe_cat_op_conv ( void   )  [static]

Definition at line 2192 of file ov.cc.

References error().

Referenced by do_cat_op().

static void gripe_unary_op ( const std::string &  on,
const std::string &  tn 
) [static]

Definition at line 2297 of file ov.cc.

References error().

Referenced by octave_value::do_non_const_unary_op(), and do_unary_op().

static void gripe_unary_op_conv ( const std::string &  on  )  [static]

Definition at line 2304 of file ov.cc.

References error().

Referenced by do_unary_op().

static void gripe_unary_op_conversion_failed ( const std::string &  op,
const std::string &  tn 
) [static]

Definition at line 2383 of file ov.cc.

References error().

Referenced by octave_value::do_non_const_unary_op().

void install_types ( void   ) 

Definition at line 2662 of file ov.cc.

References octave_class::register_type().

Referenced by octave_main().

static dim_vector make_vector_dims ( const dim_vector dv,
bool  force_vector_conversion,
const std::string &  my_type,
const std::string &  wanted_type 
) [static]
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines