GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
ov.cc File Reference
#include "data-conv.h"
#include "quit.h"
#include "str-vec.h"
#include "ovl.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-classdef.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 "ov-java.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "interpreter-private.h"
#include "pager.h"
#include "parse.h"
#include "pr-flt-fmt.h"
#include "pr-output.h"
#include "symtab.h"
#include "utils.h"
#include "variables.h"
Include dependency graph for ov.cc:

Go to the source code of this file.

Macros

#define XVALUE_EXTRACTOR(TYPE, NAME, FCN)
 

Functions

static void decode_subscripts (const char *name, const octave_value &arg, std::string &type_string, std::list< octave_value_list > &idx)
 
octave_value do_unary_op (octave::type_info &ti, octave_value::unary_op op, const octave_value &v)
 
octave_value do_unary_op (octave_value::unary_op op, const octave_value &v)
 
static OCTAVE_NORETURN void err_unary_op (const std::string &on, const std::string &tn)
 
static OCTAVE_NORETURN void err_unary_op_conv (const std::string &on)
 
static OCTAVE_NORETURN void err_unary_op_conversion_failed (const std::string &op, const std::string &tn)
 
OCTAVE_EXPORT octave_value_list Fsizeof (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fsubsref (const octave_value_list &args, int nargout) code
 
void install_types (octave::type_info &ti)
 
idx subsasgn (val, idx, 0) esult
 
idx subsref (val, idx) esult
 

Variables

nd group nd example oindent Note that this is the same as writing return ar
 
and code {"."}. The amp{subs} field may be either code{":"} or a cell array of index values. The following example shows how to extract the first two columns of a matrix xample roup val = magic (3) esult{} val = [ 8 1 6 3 5 7 4 9 2 ] idx.type = "()"
 
nd group nd example oindent Note that this is the same as writing ode {val(:, 1:2)}. If ar{idx} is an empty structure array with fields amp{type} and amp{subs}
 
octave_value::octave_value(const Array< char > &chm, char type) return retval
 
idx subs = ":"
 
idx type = "()"
 
static bool Vdisable_diagonal_matrix = false
 
static bool Vdisable_permutation_matrix = false
 
static bool Vdisable_range = false
 

Macro Definition Documentation

◆ XVALUE_EXTRACTOR

#define XVALUE_EXTRACTOR (   TYPE,
  NAME,
  FCN 
)
Value:
TYPE \
octave_value::NAME (const char *fmt, ...) const \
{ \
TYPE retval; \
\
try \
{ \
retval = FCN (); \
} \
catch (octave::execution_exception& e) \
{ \
if (fmt) \
{ \
va_list args; \
va_start (args, fmt); \
verror (e, fmt, args); \
va_end (args); \
} \
\
throw e; \
} \
\
return retval; \
}
octave_value::octave_value(const Array< char > &chm, char type) return retval
Definition: ov.cc:810
i e
Definition: data.cc:2591

Function Documentation

◆ decode_subscripts()

static void decode_subscripts ( const char *  name,
const octave_value arg,
std::string type_string,
std::list< octave_value_list > &  idx 
)
static

◆ do_unary_op() [1/2]

◆ do_unary_op() [2/2]

octave_value do_unary_op ( octave_value::unary_op  op,
const octave_value v 
)

Definition at line 2665 of file ov.cc.

References octave::__get_type_info__(), and do_unary_op().

◆ err_unary_op()

static OCTAVE_NORETURN void err_unary_op ( const std::string on,
const std::string tn 
)
static

Definition at line 2602 of file ov.cc.

References error(), and on.

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

◆ err_unary_op_conv()

static OCTAVE_NORETURN void err_unary_op_conv ( const std::string on)
static

Definition at line 2609 of file ov.cc.

References error(), and on.

Referenced by do_unary_op().

◆ err_unary_op_conversion_failed()

static OCTAVE_NORETURN void err_unary_op_conversion_failed ( const std::string op,
const std::string tn 
)
static

Definition at line 2673 of file ov.cc.

References error().

Referenced by octave_value::do_non_const_unary_op().

◆ Fsizeof()

OCTAVE_EXPORT octave_value_list Fsizeof ( const octave_value_list args,
int   
)

Definition at line 2958 of file ov.cc.

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

◆ Fsubsref()

OCTAVE_EXPORT octave_value_list Fsubsref ( const octave_value_list args,
int  nargout 
)

Definition at line 3065 of file ov.cc.

◆ install_types()

void install_types ( octave::type_info ti)

Definition at line 2894 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_oncleanup::register_type(), octave_fcn_inline::register_type(), octave_float_complex_diag_matrix::register_type(), octave_complex_diag_matrix::register_type(), octave_null_sq_str::register_type(), octave_float_diag_matrix::register_type(), octave_dld_function::register_type(), octave_diag_matrix::register_type(), octave_builtin::register_type(), octave_sparse_bool_matrix::register_type(), octave_sparse_complex_matrix::register_type(), octave_fcn_handle::register_type(), octave_sparse_matrix::register_type(), octave_struct::register_type(), octave_char_matrix_str::register_type(), octave_float_complex_matrix::register_type(), octave_cell::register_type(), octave_complex_matrix::register_type(), octave_float_complex::register_type(), octave_complex::register_type(), octave_float_matrix::register_type(), octave_bool_matrix::register_type(), octave_matrix::register_type(), octave_perm_matrix::register_type(), octave_bool::register_type(), octave_char_matrix_sq_str::register_type(), octave_lazy_index::register_type(), octave_float_scalar::register_type(), octave_scalar::register_type(), octave_scalar_struct::register_type(), octave_range::register_type(), octave_user_function::register_type(), octave_value_typeinfo::register_type(), and octave_base_value::register_type().

Referenced by octave::type_info::type_info().

◆ subsasgn()

idx subsasgn ( val  ,
idx  ,
 
)

Definition at line 3114 of file ov.cc.

◆ subsref()

Variable Documentation

◆ ar

nd group nd example oindent Note that this is the same as writing return ar

Definition at line 3065 of file ov.cc.

◆ code

and code {"."}. The amp{subs} field may be either code{":"} or a cell array of index values. The following example shows how to extract the first two columns of a matrix xample roup val = magic (3) esult{} val = [ 8 1 6 3 5 7 4 9 2 ] idx.type = "()"

Definition at line 3065 of file ov.cc.

◆ ode

nd group nd example Note that this is the same as writing ode {val(:, 1:2)}. If ar{idx} is an empty structure array with fields amp{type} and amp{subs}

Definition at line 3065 of file ov.cc.

◆ retval

octave_value::octave_value (const Array<char>& chm, char type) return retval

Definition at line 810 of file ov.cc.

Referenced by do_unary_op().

◆ subs

◆ type

idx type = "()"

Definition at line 3114 of file ov.cc.

Referenced by octave_function::accepts_postfix_index(), double_property::add_constraint(), array_property::add_constraint(), row_vector_property::add_constraint(), handle_property::add_constraint(), octave::scanf_format_list::add_elt_to_list(), octave::printf_format_list::add_elt_to_list(), octave::textscan_format_list::add_elt_to_list(), octave::symbol_record::symbol_record_rep::assign(), octave::symbol_record::assign(), octave::opengl_renderer::patch_tesselator::begin(), octave::load_path::package_info::check_file_type(), octave::marker::construct(), octave_base_value::convert_to_str(), octave_value::convert_to_str(), octave_fcn_inline::convert_to_str_internal(), octave_base_int_matrix< intNDArray< OCTAVE_INT_T > >::convert_to_str_internal(), octave_sparse_bool_matrix::convert_to_str_internal(), octave_cell::convert_to_str_internal(), octave_sparse_matrix::convert_to_str_internal(), octave_base_int_scalar< OCTAVE_INT_T >::convert_to_str_internal(), octave_char_matrix::convert_to_str_internal(), octave_lazy_index::convert_to_str_internal(), octave_bool_matrix::convert_to_str_internal(), octave_float_matrix::convert_to_str_internal(), octave_perm_matrix::convert_to_str_internal(), octave_base_diag< DiagMatrix, Matrix >::convert_to_str_internal(), octave_matrix::convert_to_str_internal(), octave_bool::convert_to_str_internal(), octave_float_scalar::convert_to_str_internal(), octave_scalar::convert_to_str_internal(), octave_range::convert_to_str_internal(), octave_value::convert_to_str_internal(), property::create(), octave::jit_module::create_global_variable(), octave::jit_typeinfo::create_identity(), octave::jit_convert::create_variable(), decode_subscripts(), do_bessel(), do_fft(), do_fft2(), do_fftn(), octave_char_matrix_str::do_index_op_internal(), octave::symbol_record::symbol_record_rep::do_non_const_unary_op(), octave::symbol_record::do_non_const_unary_op(), octave_value::do_non_const_unary_op(), octave::base_stream::do_numeric_printf_conv(), handle_property::do_set(), octave::tree_evaluator::echo_this_file(), octave_value::empty_conv(), err_wrong_type_arg(), err_wrong_type_arg_for_binary_op(), err_wrong_type_arg_for_unary_op(), octave::load_path::package_info::find_fcn(), octave::load_path::package_info::find_method(), octave::load_path::package_info::find_private_fcn(), octave::scanf_format_list::finish_conversion(), octave::printf_format_list::finish_conversion(), octave::textscan_format_list::finish_conversion(), Gaudioread(), octave::jit_typeinfo::get_grab(), octave::printf_value_cache::get_next_value(), octave::jit_typeinfo::get_release(), octave::jit_convert::get_variable(), Gqr(), gripe_wrong_type_arg(), gripe_wrong_type_arg_for_binary_op(), gripe_wrong_type_arg_for_unary_op(), octave::math::gsvd< T >::gsvd(), octave::main_window::handle_edit_mfile_request(), octave::jit_assign::infer(), octave::math::gsvd< T >::left_singular_matrix_A(), octave::math::gsvd< T >::left_singular_matrix_B(), octave::documentation_browser::loadResource(), make_graphics_object_from_type(), make_idx_args(), octave::marker::marker(), octave::jit_info::match(), octave::tree_evaluator::maybe_set_echo_state(), cdef_meta_object::meta_accepts_postfix_index(), cdef_class::cdef_class_rep::meta_accepts_postfix_index(), cdef_method::cdef_method_rep::meta_accepts_postfix_index(), cdef_package::cdef_package_rep::meta_accepts_postfix_index(), cdef_meta_object::meta_subsref(), octave_base_value::numeric_assign(), octave_struct::numeric_conv(), octave_class::numeric_conv(), octave_scalar_struct::numeric_conv(), octave::math::gsvd< T >::operator=(), octave::textscan_format_elt::operator=(), octave::jit_extract_argument::overload(), octave::jit_argument::print(), octave::jit_const< T, EXTRACT_T, PASS_T, QUOTE >::print(), octave::printf_format_list::printf_format_list(), octave::scanf_format_list::process_conversion(), octave::printf_format_list::process_conversion(), octave::textscan_format_list::process_conversion(), octave::tree_evaluator::push_echo_state(), octave::math::gsvd< T >::R_matrix(), read_doubles(), read_floats(), read_images(), read_mat5_binary_data(), read_mat5_binary_element(), read_mat5_integer_data(), read_mat5_tag(), read_mat_binary_data(), KeyboardTranslatorReader::readNext(), octave::jit_convert::resolve(), octave::math::gsvd< T >::right_singular_matrix(), octave::scanf_format_list::scanf_format_list(), octave::tree_evaluator::set_echo_state(), octave::tree_expression::set_postfix_index(), QUnixTerminalImpl::setCursorType(), QWinTerminalImpl::setCursorType(), QTerminal::setCursorType(), Filter::HotSpot::setType(), octave::jit_assign_base::short_print(), octave_builtin::stash_jit(), octave_base_scalar< bool >::subsasgn(), octave_base_diag< DiagMatrix, Matrix >::subsasgn(), octave_base_matrix< boolNDArray >::subsasgn(), octave_struct::subsasgn(), octave_cell::subsasgn(), octave_base_sparse< SparseComplexMatrix >::subsasgn(), octave_class::subsasgn(), octave_scalar_struct::subsasgn(), cdef_object::subsasgn(), octave_base_value::subsasgn(), octave_classdef::subsasgn(), octave_class::subsasgn_common(), octave_perm_matrix::subsref(), octave_base_scalar< bool >::subsref(), octave_base_diag< DiagMatrix, Matrix >::subsref(), octave_struct::subsref(), octave_lazy_index::subsref(), octave_base_matrix< boolNDArray >::subsref(), octave_cell::subsref(), octave_base_sparse< SparseComplexMatrix >::subsref(), octave_fcn_handle::subsref(), octave_range::subsref(), octave_class::subsref(), octave_java::subsref(), octave_scalar_struct::subsref(), cdef_object::subsref(), octave_base_value::subsref(), octave_value::subsref(), octave_classdef::subsref(), subsref(), symbol_exist(), octave::opengl_tesselator::tess_begin(), octave::textscan_format_list::textscan_format_list(), octave_class::undef_subsasgn(), octave_base_value::undef_subsasgn(), octave_classdef::undef_subsasgn(), octave::tree_evaluator::visit_index_expression(), octave::tree_evaluator::visit_matrix(), octave_base_value::warn_load(), octave_base_value::warn_save(), warn_wrong_type_arg(), write_doubles(), write_floats(), and write_mat5_tag().

◆ Vdisable_diagonal_matrix

bool Vdisable_diagonal_matrix = false
static

Definition at line 99 of file ov.cc.

◆ Vdisable_permutation_matrix

bool Vdisable_permutation_matrix = false
static

Definition at line 103 of file ov.cc.

◆ Vdisable_range

bool Vdisable_range = false
static

Definition at line 107 of file ov.cc.