GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#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-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 "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< int > | convert_to_int_array (const Array< octave_int< T > > &A) |
template<class T > | |
static Array< octave_idx_type > | convert_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) |
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_colon_op (const octave_value &base, const octave_value &increment, const octave_value &limit, bool is_for_cmd_expr) |
octave_value | do_unary_op (octave_value::unary_op op, const octave_value &v) |
OCTAVE_EXPORT octave_value_list | Fdisable_diagonal_matrix (const octave_value_list &args, int nargout) |
OCTAVE_EXPORT octave_value_list | Fdisable_permutation_matrix (const octave_value_list &args, int nargout) |
OCTAVE_EXPORT octave_value_list | Fdisable_range (const octave_value_list &args, int nargout) |
OCTAVE_EXPORT octave_value_list | Fis_dq_string (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fis_sq_string (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fsizeof (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fsubsasgn (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fsubsref (const octave_value_list &args, int nargout) |
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) |
Variables | |
static bool | Vdisable_diagonal_matrix = false |
static bool | Vdisable_permutation_matrix = false |
static bool | Vdisable_range = false |
|
static |
Definition at line 1705 of file ov.cc.
References A.
Referenced by octave_value::int_vector_value().
|
static |
Definition at line 1780 of file ov.cc.
References A.
Referenced by octave_value::octave_idx_type_vector_value().
|
static |
Definition at line 2950 of file ov.cc.
References octave_map::contains(), octave_map::contents(), error(), error_state, Array< T >::length(), octave_value::magic_colon_t, octave_value::map_value(), octave_map::nfields(), octave_map::numel(), and octave_value().
Referenced by Fsubsasgn(), and Fsubsref().
|
static |
Definition at line 2171 of file ov.cc.
References do_binary_op(), do_unary_op(), error(), octave_value::op_el_and, octave_value::op_el_and_not, octave_value::op_el_not_and, octave_value::op_el_not_or, octave_value::op_el_or, octave_value::op_el_or_not, octave_value::op_herm_ldiv, octave_value::op_herm_mul, octave_value::op_hermitian, octave_value::op_ldiv, octave_value::op_mul, octave_value::op_mul_herm, octave_value::op_mul_trans, octave_value::op_not, octave_value::op_trans_ldiv, octave_value::op_trans_mul, and octave_value::op_transpose.
Referenced by do_binary_op().
octave_value do_binary_op | ( | octave_value::binary_op | op, |
const octave_value & | v1, | ||
const octave_value & | v2 | ||
) |
Definition at line 1978 of file ov.cc.
References octave_value::binary_op_as_string(), octave_value::class_name(), do_binary_op(), f, gripe_binary_op(), gripe_binary_op_conv(), gripe_library_execution_error(), octave_value_typeinfo::lookup_binary_class_op(), octave_value_typeinfo::lookup_binary_op(), octave_value::numeric_conversion_function(), octave_value::numeric_demotion_function(), octave_value(), octave_value::rep, octave_class::static_type_id(), octave_classdef::static_type_id(), octave_base_value::type_conv_info::type_id(), octave_value::type_id(), octave_value::type_name(), v1, and v2.
Referenced by binary_assoc_op_defun_body(), binary_op_defun_body(), decompose_binary_op(), do_binary_op(), Fdot(), octave_class::index_vector(), octave_jit_binary_any_any(), ok_for_unsigned_int_conv(), tree_compound_binary_expression::rvalue1(), and tree_binary_expression::rvalue1().
octave_value do_binary_op | ( | octave_value::compound_binary_op | op, |
const octave_value & | v1, | ||
const octave_value & | v2 | ||
) |
Definition at line 2237 of file ov.cc.
References decompose_binary_op(), f, gripe_library_execution_error(), octave_value_typeinfo::lookup_binary_class_op(), octave_value_typeinfo::lookup_binary_op(), octave_value::rep, octave_class::static_type_id(), octave_classdef::static_type_id(), and octave_value::type_id().
octave_value do_cat_op | ( | const octave_value & | v1, |
const octave_value & | v2, | ||
const Array< octave_idx_type > & | ra_idx | ||
) |
Definition at line 2304 of file ov.cc.
References f, gripe_cat_op(), gripe_cat_op_conv(), gripe_library_execution_error(), octave_value_typeinfo::lookup_cat_op(), octave_value::numeric_conversion_function(), octave_value(), octave_value::rep, octave_base_value::type_conv_info::type_id(), octave_value::type_id(), octave_value::type_name(), v1, and v2.
Referenced by do_cat(), Fbsxfun(), and tree_matrix::rvalue1().
octave_value do_colon_op | ( | const octave_value & | base, |
const octave_value & | increment, | ||
const octave_value & | limit, | ||
bool | is_for_cmd_expr | ||
) |
Definition at line 2393 of file ov.cc.
References octave_value::class_name(), octave_value::convert_to_str(), error(), error_state, feval(), symbol_table::find_method(), octave_value::function_value(), octave_value::is_defined(), octave_value::is_dq_string(), Array< T >::is_empty(), octave_value::is_object(), octave_value::is_string(), octave_value_list::length(), octave_value::matrix_value(), and octave_value().
Referenced by Fcolon(), and tree_colon_expression::rvalue1().
octave_value do_unary_op | ( | octave_value::unary_op | op, |
const octave_value & | v | ||
) |
Definition at line 2511 of file ov.cc.
References octave_value::class_name(), do_unary_op(), f, gripe_library_execution_error(), gripe_unary_op(), gripe_unary_op_conv(), octave_value_typeinfo::lookup_unary_class_op(), octave_value_typeinfo::lookup_unary_op(), octave_value::numeric_conversion_function(), octave_value(), octave_value::rep, octave_class::static_type_id(), octave_classdef::static_type_id(), octave_value::type_id(), octave_value::type_name(), and octave_value::unary_op_as_string().
Referenced by decompose_binary_op(), do_unary_op(), tree_prefix_expression::rvalue1(), tree_postfix_expression::rvalue1(), and unary_op_defun_body().
OCTAVE_EXPORT octave_value_list Fdisable_diagonal_matrix | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 3318 of file ov.cc.
References SET_INTERNAL_VARIABLE.
Referenced by maximum_braindamage().
OCTAVE_EXPORT octave_value_list Fdisable_permutation_matrix | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 3288 of file ov.cc.
References SET_INTERNAL_VARIABLE.
Referenced by maximum_braindamage().
OCTAVE_EXPORT octave_value_list Fdisable_range | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 3362 of file ov.cc.
References SET_INTERNAL_VARIABLE.
Referenced by maximum_braindamage().
OCTAVE_EXPORT octave_value_list Fis_dq_string | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3251 of file ov.cc.
References octave_value::is_dq_string(), and print_usage().
OCTAVE_EXPORT octave_value_list Fis_sq_string | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3224 of file ov.cc.
References octave_value::is_sq_string(), and print_usage().
OCTAVE_EXPORT octave_value_list Fsizeof | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 2931 of file ov.cc.
References octave_value::byte_size(), and print_usage().
OCTAVE_EXPORT octave_value_list Fsubsasgn | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3116 of file ov.cc.
References decode_subscripts(), error_state, octave_value::make_unique(), print_usage(), octave_value::storable_value(), and octave_value::subsasgn().
OCTAVE_EXPORT octave_value_list Fsubsref | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 3058 of file ov.cc.
References decode_subscripts(), error_state, print_usage(), and octave_value::subsref().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 2498 of file ov.cc.
References error().
Referenced by octave_value::do_non_const_unary_op(), and do_unary_op().
|
static |
|
static |
Definition at line 2585 of file ov.cc.
References error().
Referenced by octave_value::do_non_const_unary_op().
void install_types | ( | void | ) |
Definition at line 2865 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_fcn_inline::register_type(), octave_oncleanup::register_type(), octave_diag_matrix::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_bool_matrix::register_type(), octave_perm_matrix::register_type(), octave_matrix::register_type(), octave_bool::register_type(), octave_lazy_index::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().
|
static |
Definition at line 1639 of file ov.cc.
References dim_vector::chop_trailing_singletons(), gripe_implicit_conversion(), dim_vector::length(), and dim_vector::numel().
Referenced by octave_value::complex_vector_value(), octave_value::float_complex_vector_value(), octave_value::float_vector_value(), octave_value::int_vector_value(), octave_value::octave_idx_type_vector_value(), and octave_value::vector_value().