GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "dim-vector.h"
Static Public Member Functions | |
static dim_vector | alloc (int n) |
static octave_idx_type | dim_max (void) |
Private Member Functions | |
octave_idx_type * | clonerep (void) |
octave_idx_type & | count (void) const |
void | freerep (void) |
void | make_unique (void) |
octave_idx_type & | ndims (void) const |
octave_idx_type * | resizerep (int n, octave_idx_type fill_value) |
Static Private Member Functions | |
static octave_idx_type * | newrep (int ndims) |
static octave_idx_type * | nil_rep (void) |
Private Attributes | |
octave_idx_type * | rep |
Friends | |
bool | operator== (const dim_vector &a, const dim_vector &b) |
Definition at line 53 of file dim-vector.h.
|
inlineexplicit |
Definition at line 157 of file dim-vector.h.
|
inline |
Definition at line 173 of file dim-vector.h.
|
inline |
Definition at line 174 of file dim-vector.h.
|
inline |
Definition at line 175 of file dim-vector.h.
|
inline |
Definition at line 176 of file dim-vector.h.
|
inline |
Definition at line 177 of file dim-vector.h.
|
inline |
Definition at line 178 of file dim-vector.h.
|
inlineexplicit |
Definition at line 233 of file dim-vector.h.
References OCTREFCOUNT_ATOMIC_INCREMENT.
|
inline |
Definition at line 236 of file dim-vector.h.
References OCTREFCOUNT_ATOMIC_INCREMENT.
|
inlineexplicit |
Definition at line 240 of file dim-vector.h.
|
inline |
Definition at line 261 of file dim-vector.h.
References OCTREFCOUNT_ATOMIC_DECREMENT.
Definition at line 335 of file dim-vector.h.
References jit_convention::length, and num_ones().
Referenced by octave_value_list::all_scalars(), Octave_map::assign(), octave_base_sparse< T >::print_as_scalar(), octave_base_matrix< MT >::print_as_scalar(), octave_base_diag< DMT, MT >::print_as_scalar(), and octave_perm_matrix::print_as_scalar().
Definition at line 290 of file dim-vector.h.
References elem, and jit_convention::length.
Referenced by octave_value::all_zero_dims(), octave_map::concat(), Octave_map::concat(), do_fft2(), do_fftn(), octave_rand::do_float_nd_array(), octave_rand::do_nd_array(), idx_vector::idx_mask_rep::idx_mask_rep(), idx_vector::idx_vector_rep::idx_vector_rep(), oct_catop_matrix_struct(), and oct_catop_struct_matrix().
|
inlinestatic |
Definition at line 242 of file dim-vector.h.
Referenced by Array< T >::assign(), convolve(), do_mat2cell(), do_mat2cell_nd(), Fbase64_decode(), Fblkmm(), Freshape(), Fvec(), get_dims_str(), get_red_dims(), Array< T >::index(), Array< T >::permute(), redim(), and zero_dims_inquire().
Definition at line 366 of file dim-vector.h.
References elem, and jit_convention::length.
Referenced by Array< T >::resize().
Definition at line 317 of file dim-vector.h.
References elem, and jit_convention::length.
Referenced by do_fft(), Farrayfun(), Fcellfun(), octave_base_sparse< T >::print_as_scalar(), octave_base_matrix< MT >::print_as_scalar(), octave_base_diag< DMT, MT >::print_as_scalar(), octave_perm_matrix::print_as_scalar(), print_empty_nd_array(), and single_type_concat().
|
inline |
Definition at line 394 of file dim-vector.h.
References elem, and jit_convention::length.
|
inline |
Definition at line 402 of file dim-vector.h.
References elem, and jit_convention::length.
Definition at line 43 of file dim-vector.cc.
References make_unique(), ndims(), and rep.
Referenced by Array< T >::assign(), and zero_dims_inquire().
Definition at line 200 of file dim-vector.h.
Referenced by Array< octave_value >::Array(), Array< T >::Array(), Array< T >::assign(), Array< octave_value >::chop_trailing_singletons(), Array< T >::clear(), concat(), DEFUN(), do_rand(), fill_matrix(), Array< T >::index(), make_vector_dims(), and Array< T >::nth_element().
|
inlineprivate |
Definition at line 79 of file dim-vector.h.
|
inline |
Definition at line 428 of file dim-vector.h.
References jit_convention::length.
Referenced by compute_index(), Array< octave_value >::compute_index_unchecked(), do_bsxfun_op(), and do_inplace_bsxfun_op().
|
inline |
Definition at line 439 of file dim-vector.h.
bool dim_vector::concat | ( | const dim_vector & | dvb, |
int | dim | ||
) |
Definition at line 177 of file dim-vector.cc.
References chop_trailing_singletons(), make_unique(), match(), ndims(), rep, and resize().
Referenced by octave_map::cat(), Sparse< T >::cat(), Array< T >::cat(), do_cat(), and hvcat().
|
inlineprivate |
Definition at line 63 of file dim-vector.h.
|
inline |
Definition at line 482 of file dim-vector.h.
References jit_convention::length.
Referenced by do_bsxfun_op(), and do_inplace_bsxfun_op().
|
inline |
Definition at line 467 of file dim-vector.h.
References jit_convention::length, and rep.
Referenced by convolve(), do_bsxfun_op(), and do_inplace_bsxfun_op().
|
static |
Definition at line 37 of file dim-vector.cc.
References max().
Referenced by Fsizemax(), and safe_numel().
|
inline |
Definition at line 183 of file dim-vector.h.
Referenced by num_ones(), squeeze(), and str().
|
inline |
Definition at line 192 of file dim-vector.h.
Definition at line 306 of file dim-vector.h.
References elem, and jit_convention::length.
Definition at line 415 of file dim-vector.h.
References elem, and jit_convention::length.
Referenced by do_accumdim_sum(), do_cellslices_nda(), do_diff(), Fcellslices(), Fdot(), Fnth_element(), Fsort(), MArray< T >::idx_add_nd(), SparseMatrix::max(), SparseComplexMatrix::max(), SparseMatrix::min(), and SparseComplexMatrix::min().
Definition at line 122 of file dim-vector.h.
bool dim_vector::hvcat | ( | const dim_vector & | dvb, |
int | dim | ||
) |
Definition at line 240 of file dim-vector.cc.
References concat(), dim_vector(), length(), and rep.
Referenced by Sparse< T >::cat(), Array< T >::cat(), and do_cat().
|
inline |
Definition at line 452 of file dim-vector.h.
References jit_convention::length.
Referenced by do_bsxfun_op(), do_inplace_bsxfun_op(), do_mat2cell(), and do_mat2cell_nd().
Definition at line 410 of file dim-vector.h.
References elem, and jit_convention::length.
Referenced by Fdot(), Fissorted(), Range::index(), Array< T >::index(), Array< octave_value >::is_vector(), and idx_vector::is_vector().
Definition at line 267 of file dim-vector.h.
Referenced by all_colon_equiv(), Array< octave_value >::as_column(), Array< octave_value >::as_matrix(), Array< octave_value >::as_row(), Array< T >::assign(), Array< T >::cat(), check_dimensions(), OCTAVE_VALUE_INT_MATRIX_T::complex_matrix_value(), convert_packcomplex_Nd(), DEFCONSTFUN(), DEFUN(), Array< T >::diag(), do_cat(), do_cellslices_nda(), do_diff(), do_fft(), do_fft2(), do_fftn(), do_num2cell_helper(), do_trilu(), Fblkmm(), Fbsxfun(), Fcellslices(), Fellipj(), Ffilter(), fill_matrix(), filter(), Find2sub(), OCTAVE_VALUE_INT_MATRIX_T::float_complex_matrix_value(), OCTAVE_VALUE_INT_MATRIX_T::float_matrix_value(), ComplexNDArray::fourier(), FloatComplexNDArray::fourier(), FloatNDArray::fourier(), NDArray::fourier(), ComplexNDArray::fourier2d(), FloatComplexNDArray::fourier2d(), FloatNDArray::fourier2d(), NDArray::fourier2d(), ComplexNDArray::fourierNd(), FloatComplexNDArray::fourierNd(), FloatNDArray::fourierNd(), NDArray::fourierNd(), freeze(), Fsize(), get_dims_str(), get_ra_idx(), get_red_dims(), get_vec_dims(), hvcat(), idx_vector::idx_mask_rep::idx_mask_rep(), idx_vector::idx_vector_rep::idx_vector_rep(), ComplexNDArray::ifourier(), FloatComplexNDArray::ifourier(), FloatNDArray::ifourier(), NDArray::ifourier(), ComplexNDArray::ifourier2d(), FloatComplexNDArray::ifourier2d(), FloatNDArray::ifourier2d(), NDArray::ifourier2d(), ComplexNDArray::ifourierNd(), FloatComplexNDArray::ifourierNd(), FloatNDArray::ifourierNd(), NDArray::ifourierNd(), increment_index(), ind2sub(), Sparse< T >::index(), index_in_bounds(), tm_const::init(), ComplexNDArray::insert(), FloatComplexNDArray::insert(), is_scalar(), is_valid_bsxfun(), is_valid_inplace_bsxfun(), is_vector(), isvector(), octave_value::length(), make_vector_dims(), mat2cell_mismatch(), OCTAVE_VALUE_INT_MATRIX_T::matrix_value(), SparseMatrix::max(), SparseComplexMatrix::max(), maybe_update_column(), SparseMatrix::min(), SparseComplexMatrix::min(), octave_base_value::ndims(), Array< octave_value >::ndims(), Sparse< bool >::ndims(), Array< T >::nth_element(), num_ones(), operator<<(), operator==(), Array< T >::permute(), rec_index_helper::rec_index_helper(), rec_resize_helper::rec_resize_helper(), redim(), Sparse< T >::reshape(), octave_base_diag< DMT, MT >::resize(), Sparse< T >::resize(), Array< T >::resize(), safe_numel(), octave_base_int_matrix< T >::save_ascii(), octave_struct::save_ascii(), octave_float_complex_matrix::save_ascii(), octave_char_matrix_str::save_ascii(), octave_complex_matrix::save_ascii(), octave_cell::save_ascii(), octave_float_matrix::save_ascii(), octave_bool_matrix::save_ascii(), octave_matrix::save_ascii(), octave_scalar_struct::save_ascii(), octave_base_int_matrix< T >::save_binary(), octave_sparse_bool_matrix::save_binary(), octave_struct::save_binary(), octave_sparse_complex_matrix::save_binary(), octave_sparse_matrix::save_binary(), octave_float_complex_matrix::save_binary(), octave_char_matrix_str::save_binary(), octave_complex_matrix::save_binary(), octave_cell::save_binary(), octave_float_matrix::save_binary(), octave_bool_matrix::save_binary(), octave_matrix::save_binary(), octave_base_int_matrix< T >::save_hdf5(), octave_float_complex_matrix::save_hdf5(), octave_char_matrix_str::save_hdf5(), octave_complex_matrix::save_hdf5(), octave_cell::save_hdf5(), octave_float_matrix::save_hdf5(), octave_bool_matrix::save_hdf5(), octave_matrix::save_hdf5(), save_hdf5_empty(), scalar(), octave_class::size(), octave_base_value::size(), octave_lazy_index::sort(), Array< T >::sort(), idx_vector::idx_vector_rep::sort_uniq_clone(), Sparse< T >::Sparse(), squeeze(), str(), try_cellfun_internal_ops(), update_index(), array_property::validate(), vector_equivalent(), and zero_dims_inquire().
Definition at line 128 of file dim-vector.h.
References OCTREFCOUNT_ATOMIC_DECREMENT.
Referenced by chop_all_singletons(), and concat().
|
inlineprivate |
Definition at line 61 of file dim-vector.h.
Referenced by chop_all_singletons(), and concat().
|
inlinestaticprivate |
Definition at line 67 of file dim-vector.h.
|
inlinestaticprivate |
Definition at line 223 of file dim-vector.h.
References rep.
Definition at line 81 of file dim-vector.cc.
|
inline |
Definition at line 344 of file dim-vector.h.
References elem, and jit_convention::length.
Referenced by airy(), betainc(), betaincinv(), biry(), compute_index(), convert_packcomplex_Nd(), octave_base_int_matrix< T >::convert_to_str_internal(), octave_sparse_matrix::convert_to_str_internal(), octave_float_matrix::convert_to_str_internal(), octave_matrix::convert_to_str_internal(), dims_to_numel(), do_bessel(), do_bsxfun_op(), do_inplace_bsxfun_op(), do_object2cell(), Fbsxfun(), octave_fftw::fftNd(), filter(), Fregexprep(), Freshape(), gammainc(), get_ra_idx(), octave_fftw::ifftNd(), ind2sub(), octave_base_sparse< T >::is_true(), octave_base_matrix< MT >::is_true(), octave_char_matrix_str::load_ascii(), octave_cell::load_ascii(), octave_base_int_matrix< T >::load_binary(), octave_float_complex_matrix::load_binary(), octave_char_matrix_str::load_binary(), octave_complex_matrix::load_binary(), octave_cell::load_binary(), octave_float_matrix::load_binary(), octave_bool_matrix::load_binary(), octave_matrix::load_binary(), octave_cell::load_hdf5(), octave_bool_matrix::load_hdf5(), make_vector_dims(), octave_class::numel(), octave_base_value::numel(), octave_print_internal_template(), read_mat5_binary_element(), Sparse< T >::reshape(), octave_float_complex::resize(), octave_complex::resize(), octave_scalar::resize(), octave_float_scalar::resize(), octave_bool::resize(), OCTAVE_VALUE_INT_SCALAR_T::resize(), octave_char_matrix_str::save_ascii(), octave_cell::save_ascii(), octave_float_complex_matrix::save_binary(), octave_char_matrix_str::save_binary(), octave_complex_matrix::save_binary(), octave_cell::save_binary(), octave_float_matrix::save_binary(), octave_matrix::save_binary(), octave_char_matrix_str::save_hdf5(), octave_cell::save_hdf5(), save_mat5_binary_element(), and Array< T >::sort().
|
inline |
Definition at line 269 of file dim-vector.h.
References elem.
|
inline |
Definition at line 271 of file dim-vector.h.
References elem.
|
inline |
Definition at line 247 of file dim-vector.h.
References OCTREFCOUNT_ATOMIC_DECREMENT, OCTREFCOUNT_ATOMIC_INCREMENT, and rep.
dim_vector dim_vector::redim | ( | int | n | ) | const |
Definition at line 265 of file dim-vector.cc.
References alloc(), length(), and rep.
Referenced by Array< octave_value >::as_matrix(), octave_base_matrix< MT >::assign(), Array< T >::assign(), compute_index(), convolve(), DEFUN(), dims_to_numel(), do_bsxfun_op(), Fdot(), Find2sub(), Fsize(), Fsub2ind(), MArray< T >::idx_add_nd(), Array< T >::index(), Array< T >::insert(), Array< T >::resize(), sub2ind(), octave_struct::subsasgn(), octave_cell::subsasgn(), and tree_evaluator::visit_simple_for_command().
Definition at line 273 of file dim-vector.h.
References jit_convention::length, and OCTREFCOUNT_ATOMIC_DECREMENT.
Referenced by octave_map::cat(), concat(), DEFCONSTFUN(), DEFUN(), mxArray_matlab::dims_to_dim_vector(), do_bsxfun_op(), octave_map::do_cat(), do_num2cell_helper(), do_rand(), Fbsxfun(), fill_matrix(), freeze(), Fresize(), get_dim_vector(), get_dimensions(), get_object_dims(), octave_base_int_matrix< T >::load_ascii(), octave_struct::load_ascii(), octave_float_complex_matrix::load_ascii(), octave_char_matrix_str::load_ascii(), octave_complex_matrix::load_ascii(), octave_cell::load_ascii(), octave_float_matrix::load_ascii(), octave_bool_matrix::load_ascii(), octave_matrix::load_ascii(), octave_base_int_matrix< T >::load_binary(), octave_float_complex_matrix::load_binary(), octave_char_matrix_str::load_binary(), octave_complex_matrix::load_binary(), octave_cell::load_binary(), octave_float_matrix::load_binary(), octave_bool_matrix::load_binary(), octave_matrix::load_binary(), octave_base_int_matrix< T >::load_hdf5(), octave_float_complex_matrix::load_hdf5(), octave_char_matrix_str::load_hdf5(), octave_complex_matrix::load_hdf5(), octave_cell::load_hdf5(), octave_float_matrix::load_hdf5(), octave_bool_matrix::load_hdf5(), octave_matrix::load_hdf5(), load_hdf5_empty(), Array< T >::nth_element(), Array< T >::permute(), read_mat5_binary_element(), Sparse< T >::reshape(), single_type_concat(), Array< T >::sort(), Array< T >::squeeze(), squeeze(), and zero_dims_inquire().
|
inlineprivate |
Definition at line 96 of file dim-vector.h.
octave_idx_type dim_vector::safe_numel | ( | void | ) | const |
Definition at line 93 of file dim-vector.cc.
References dim_max(), idx_max, length(), and rep.
Referenced by Array< T >::Array(), Array< T >::clear(), octave_base_sparse< SparseComplexMatrix >::numel(), Sparse< bool >::numel(), and Sparse< T >::Sparse().
dim_vector dim_vector::squeeze | ( | void | ) | const |
Definition at line 112 of file dim-vector.cc.
References dim_vector(), elem(), length(), and resize().
Referenced by octave_map::squeeze().
Definition at line 63 of file dim-vector.cc.
References elem(), and length().
Referenced by Array< T >::Array(), cbuni(), do_bsxfun_op(), symbol_table::do_workspace_info(), octave_base_value::dump(), eval_error(), Fblkmm(), gammainc(), get_dims_str(), gripe_betainc_nonconformant(), gripe_betaincinv_nonconformant(), gripe_nonconformant(), operator<<(), print_empty_nd_array(), octave_struct::print_raw(), octave_cell::print_raw(), octave_scalar_struct::print_raw(), Sparse< T >::reshape(), zacon(), zairy(), zasyi(), zbesh(), zbesi(), zbesj(), zbesy(), zbiry(), zbknu(), zbuni(), zkscl(), zmlri(), zseri(), zunhj(), zuni1(), zuni2(), zunik(), zunk1(), zunk2(), zuoik(), and zwrsk().
|
inline |
Definition at line 216 of file dim-vector.h.
Referenced by Array< octave_value >::jit_dimensions().
Definition at line 312 of file dim-vector.h.
References elem, and jit_convention::length.
Referenced by Array< T >::assign(), Array< T >::cat(), tm_row_const::tm_row_const_rep::cellify(), tm_row_const::tm_row_const_rep::do_init_element(), and tm_row_const::tm_row_const_rep::init().
|
friend |
Definition at line 497 of file dim-vector.h.
|
private |
Definition at line 59 of file dim-vector.h.
Referenced by chop_all_singletons(), concat(), cumulative(), hvcat(), nil_rep(), operator=(), operator==(), redim(), and safe_numel().