GNU Octave
4.2.1
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 "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 "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.
Macros | |
#define | XVALUE_EXTRACTOR(TYPE, NAME, FCN) |
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 = "()" |
OCTAVE_EXPORT octave_value_list | int16 |
OCTAVE_EXPORT octave_value_list | int32 |
OCTAVE_EXPORT octave_value_list | int64 |
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} |
idx | subs = ":" |
idx | type = "()" |
OCTAVE_EXPORT octave_value_list | uint16 |
OCTAVE_EXPORT octave_value_list | uint32 |
static bool | Vdisable_diagonal_matrix = false |
static bool | Vdisable_permutation_matrix = false |
static bool | Vdisable_range = false |
OCTAVE_EXPORT octave_value_list uint64 nd deftypefn* return args | ( | 0 | ) |
Referenced by do_colon_op(), Fdouble(), Fsingle(), Fsizeof(), and subsref().
|
static |
Definition at line 1810 of file ov.cc.
Referenced by octave_value::int_vector_value().
|
static |
Definition at line 1879 of file ov.cc.
Referenced by octave_value::octave_idx_type_vector_value().
|
static |
Definition at line 2988 of file ov.cc.
References octave_map::contains(), octave_map::contents(), error(), k, m, octave_value::magic_colon_t, octave_map::nfields(), Array< T >::numel(), octave_map::numel(), octave_value(), string, subs, type, and octave_value::xmap_value().
Referenced by subsref().
|
static |
Definition at line 2356 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 2214 of file ov.cc.
References octave_value::binary_op_as_string(), octave_value::class_name(), do_binary_op(), err_binary_op(), err_binary_op_conv(), f, 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, retval, octave_class::static_type_id(), octave_classdef::static_type_id(), tmp, octave_base_value::type_conv_info::type_id(), octave_value::type_id(), octave_value::type_name(), and v2.
Referenced by decompose_binary_op(), do_binary_op(), 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 2407 of file ov.cc.
References decompose_binary_op(), f, octave_value_typeinfo::lookup_binary_class_op(), octave_value_typeinfo::lookup_binary_op(), octave_value::rep, retval, 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 2456 of file ov.cc.
References err_cat_op(), err_cat_op_conv(), f, octave_value_typeinfo::lookup_cat_op(), octave_value::numeric_conversion_function(), octave_value(), octave_value::rep, retval, tmp, octave_base_value::type_conv_info::type_id(), octave_value::type_id(), octave_value::type_name(), and v2.
Referenced by octave::textscan::do_scan(), tree_matrix::rvalue1(), and octave::textscan::scan_one().
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 2524 of file ov.cc.
References args(), octave_value::class_name(), octave_value::convert_to_str(), e, error(), 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(), octave_value(), retval, string, and tmp.
Referenced by tree_colon_expression::rvalue1().
octave_value do_unary_op | ( | octave_value::unary_op | op, |
const octave_value & | v | ||
) |
Definition at line 2645 of file ov.cc.
References octave_value::class_name(), do_unary_op(), err_unary_op(), err_unary_op_conv(), f, octave_value_typeinfo::lookup_unary_class_op(), octave_value_typeinfo::lookup_unary_op(), octave_value::numeric_conversion_function(), octave_value(), octave_value::rep, retval, octave_class::static_type_id(), octave_classdef::static_type_id(), t, tmp, 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(), and tree_postfix_expression::rvalue1().
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 2632 of file ov.cc.
References error().
Referenced by octave_value::do_non_const_unary_op(), and do_unary_op().
|
static |
|
static |
Definition at line 2696 of file ov.cc.
References error().
Referenced by octave_value::do_non_const_unary_op().
OCTAVE_EXPORT octave_value_list Fdouble | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1173 of file ov.cc.
References args(), ovl(), and print_usage().
Referenced by install_ov_fcns().
OCTAVE_EXPORT octave_value_list Fint16 | ( | const octave_value_list & | args, |
int | |||
) |
Referenced by install_ov_fcns().
OCTAVE_EXPORT octave_value_list Fint32 | ( | const octave_value_list & | args, |
int | |||
) |
Referenced by install_ov_fcns().
OCTAVE_EXPORT octave_value_list Fint64 | ( | const octave_value_list & | args, |
int | |||
) |
Referenced by install_ov_fcns().
OCTAVE_EXPORT octave_value_list Fint8 | ( | const octave_value_list & | args, |
int | |||
) |
Referenced by install_ov_fcns().
OCTAVE_EXPORT octave_value_list Fsingle | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1217 of file ov.cc.
References args(), ovl(), and print_usage().
Referenced by install_ov_fcns().
OCTAVE_EXPORT octave_value_list Fsizeof | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 2973 of file ov.cc.
References args(), ovl(), and print_usage().
Referenced by install_ov_fcns().
OCTAVE_EXPORT octave_value_list Fsubsref | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 3080 of file ov.cc.
Referenced by install_ov_fcns().
OCTAVE_EXPORT octave_value_list Fuint16 | ( | const octave_value_list & | args, |
int | |||
) |
Referenced by install_ov_fcns().
OCTAVE_EXPORT octave_value_list Fuint32 | ( | const octave_value_list & | args, |
int | |||
) |
Referenced by install_ov_fcns().
OCTAVE_EXPORT octave_value_list Fuint64 | ( | const octave_value_list & | args, |
int | |||
) |
Referenced by install_ov_fcns().
OCTAVE_EXPORT octave_value_list Fuint8 | ( | const octave_value_list & | args, |
int | |||
) |
Referenced by install_ov_fcns().
void install_types | ( | void | ) |
Definition at line 2909 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_dld_function::register_type(), octave_null_sq_str::register_type(), octave_float_diag_matrix::register_type(), octave_diag_matrix::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_java::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_class::register_type(), octave_float_matrix::register_type(), octave_bool_matrix::register_type(), octave_perm_matrix::register_type(), octave_matrix::register_type(), octave_lazy_index::register_type(), octave_char_matrix_sq_str::register_type(), octave_bool::register_type(), octave_scalar::register_type(), octave_float_scalar::register_type(), octave_scalar_struct::register_type(), octave_range::register_type(), octave_user_function::register_type(), and octave_base_value::register_type().
|
static |
Definition at line 1747 of file ov.cc.
References dim_vector::chop_trailing_singletons(), dim_vector::ndims(), dim_vector::numel(), retval, and warn_implicit_conversion().
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().
idx subsref | ( | val | , |
idx | |||
) |
Definition at line 3080 of file ov.cc.
References args(), decode_subscripts(), nargout(), ovl(), print_usage(), string, octave_value::subsref(), and type.
Referenced by octave_class::do_multi_index_op(), octave_mex_function::subsref(), octave_builtin::subsref(), octave_perm_matrix::subsref(), octave_base_scalar< bool >::subsref(), octave_struct::subsref(), octave_base_diag< DiagMatrix, Matrix >::subsref(), octave_cell::subsref(), octave_fcn_handle::subsref(), octave_lazy_index::subsref(), octave_base_matrix< boolNDArray >::subsref(), octave_class::subsref(), octave_base_sparse< SparseComplexMatrix >::subsref(), octave_range::subsref(), octave_user_script::subsref(), octave_user_function::subsref(), and octave_classdef::subsref().
OCTAVE_EXPORT octave_value_list int16 |
Definition at line 1302 of file ov.cc.
Referenced by box(), do_minmax_body(), do_trilu(), install_i32_i32_ops(), install_i64_i64_ops(), install_i8_i8_ops(), install_ui16_ui16_ops(), install_ui32_ui32_ops(), install_ui64_ui64_ops(), install_ui8_ui8_ops(), and unbox().
OCTAVE_EXPORT octave_value_list int32 |
Definition at line 1258 of file ov.cc.
Referenced by box(), do_minmax_body(), do_trilu(), install_i16_i16_ops(), install_i64_i64_ops(), install_i8_i8_ops(), install_ui16_ui16_ops(), install_ui32_ui32_ops(), install_ui64_ui64_ops(), install_ui8_ui8_ops(), and unbox().
OCTAVE_EXPORT octave_value_list int64 |
Definition at line 1258 of file ov.cc.
Referenced by box(), do_minmax_body(), do_trilu(), install_i16_i16_ops(), install_i32_i32_ops(), install_i8_i8_ops(), install_ui16_ui16_ops(), install_ui32_ui32_ops(), install_ui64_ui64_ops(), install_ui8_ui8_ops(), and unbox().
idx subs = ":" |
Definition at line 3080 of file ov.cc.
Referenced by decode_subscripts().
idx type = "()" |
Definition at line 3129 of file ov.cc.
Referenced by symbol_table::fcn_info::fcn_info_rep::add_dispatch(), scanf_format_list::add_elt_to_list(), printf_format_list::add_elt_to_list(), load_path::check_file_type(), octave_lvalue::clear_index(), marker::construct(), convert_to_string(), jit_typeinfo::create_identity(), jit_convert::create_variable(), decode_subscripts(), base_graphics_object::defaults(), octave_classdef_meta::do_multi_index_op(), octave_base_stream::do_numeric_printf_conv(), err_wrong_type_arg(), err_wrong_type_arg_for_binary_op(), err_wrong_type_arg_for_unary_op(), execute_ov(), Gaudioread(), jit_convert::get_variable(), Gqr(), gripe_wrong_type_arg(), gripe_wrong_type_arg_for_binary_op(), gripe_wrong_type_arg_for_unary_op(), file_editor::handle_edit_mfile_request(), octave_lvalue::index_type(), base_graphics_object::isa(), jit_store_argument::jit_store_argument(), jit_info::match(), octave_lvalue::operator=(), scanf_format_elt::operator=(), printf_format_elt::operator=(), octave::textscan_format_elt::operator=(), parser::parse_info_map(), jit_argument::print(), printf_format_list::printf_format_list(), octave::textscan_format_list::process_conversion(), read_images(), read_mat5_binary_element(), read_mat_binary_data(), KeyboardTranslatorReader::readNext(), replace_links(), jit_convert::resolve(), tree_matrix::rvalue1(), scanf_format_list::scanf_format_list(), tree_expression::set_postfix_index(), Filter::HotSpot::setType(), octave_builtin::stash_jit(), subsref(), octave::textscan_format_list::textscan_format_list(), tree_index_expression::type_tags(), octave_base_value::warn_load(), octave_base_value::warn_save(), warn_wrong_type_arg(), write_doubles(), write_floats(), and write_mat5_tag().
OCTAVE_EXPORT octave_value_list uint16 |
Definition at line 1258 of file ov.cc.
Referenced by do_minmax_body(), do_trilu(), install_i16_i16_ops(), install_i32_i32_ops(), install_i64_i64_ops(), install_i8_i8_ops(), install_ui32_ui32_ops(), install_ui64_ui64_ops(), install_ui8_ui8_ops(), and unbox().
OCTAVE_EXPORT octave_value_list uint32 |
Definition at line 1258 of file ov.cc.
Referenced by do_minmax_body(), do_trilu(), install_i16_i16_ops(), install_i32_i32_ops(), install_i64_i64_ops(), install_i8_i8_ops(), install_ui16_ui16_ops(), install_ui64_ui64_ops(), install_ui8_ui8_ops(), and unbox().