Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends

dim_vector Class Reference

#include "dim-vector.h"

Collaboration diagram for dim_vector:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 dim_vector (octave_idx_type n) GCC_ATTR_DEPRECATED
 dim_vector (void)
 dim_vector (const dim_vector &dv)
 ~dim_vector (void)
bool all_ones (void) const
bool all_zero (void) const
bool any_neg (void) const
bool any_zero (void) const
dim_vector as_column (void) const
dim_vector as_row (void) const
void chop_all_singletons (void)
void chop_trailing_singletons (void)
octave_idx_type compute_index (const octave_idx_type *idx) const
octave_idx_type compute_index (const octave_idx_type *idx, int nidx) const
bool concat (const dim_vector &dvb, int dim)
octave_idx_type cum_compute_index (const octave_idx_type *idx) const
dim_vector cumulative (void) const
octave_idx_type elem (int i) const
octave_idx_typeelem (int i)
bool empty_2d (void) const
int first_non_singleton (int def=0) const
bool hvcat (const dim_vector &dvb, int dim)
int increment_index (octave_idx_type *idx, int start=0) const
bool is_vector (void) const
int length (void) const
int num_ones (void) const
octave_idx_type numel (int n=0) const
octave_idx_typeoperator() (int i)
octave_idx_type operator() (int i) const
dim_vectoroperator= (const dim_vector &dv)
dim_vector redim (int n) const
void resize (int n, int fill_value=0)
octave_idx_type safe_numel (void) const
dim_vector squeeze (void) const
std::string str (char sep= 'x') const
bool zero_by_zero (void) const

Static Public Member Functions

static dim_vector alloc (int n)
static octave_idx_type dim_max (void)

Private Member Functions

 dim_vector (octave_idx_type *r)
octave_idx_typeclonerep (void)
octave_idx_typecount (void) const
void freerep (void)
void make_unique (void)
octave_idx_typendims (void) const
octave_idx_typeresizerep (int n, octave_idx_type fill_value)

Static Private Member Functions

static octave_idx_typenewrep (int ndims)
static octave_idx_typenil_rep (void)

Private Attributes

octave_idx_typerep

Friends

bool operator== (const dim_vector &a, const dim_vector &b)

Detailed Description

Definition at line 53 of file dim-vector.h.


Constructor & Destructor Documentation

dim_vector::dim_vector ( octave_idx_type  n  )  [inline, explicit]

Definition at line 157 of file dim-vector.h.

dim_vector::dim_vector ( octave_idx_type r  )  [inline, explicit, private]

Definition at line 223 of file dim-vector.h.

dim_vector::dim_vector ( void   )  [inline, explicit]

Definition at line 230 of file dim-vector.h.

References OCTREFCOUNT_ATOMIC_INCREMENT.

Referenced by hvcat(), and squeeze().

dim_vector::dim_vector ( const dim_vector dv  )  [inline]

Definition at line 233 of file dim-vector.h.

References OCTREFCOUNT_ATOMIC_INCREMENT.

dim_vector::~dim_vector ( void   )  [inline]

Definition at line 255 of file dim-vector.h.

References OCTREFCOUNT_ATOMIC_DECREMENT.


Member Function Documentation

bool dim_vector::all_ones ( void   )  const [inline]
bool dim_vector::all_zero ( void   )  const [inline]
static dim_vector dim_vector::alloc ( int  n  )  [inline, static]
bool dim_vector::any_neg ( void   )  const [inline]

Definition at line 360 of file dim-vector.h.

References elem.

Referenced by Array< T >::resize().

bool dim_vector::any_zero ( void   )  const [inline]
dim_vector dim_vector::as_column ( void   )  const [inline]

Definition at line 388 of file dim-vector.h.

References elem.

dim_vector dim_vector::as_row ( void   )  const [inline]

Definition at line 396 of file dim-vector.h.

References elem.

void dim_vector::chop_all_singletons ( void   ) 

Definition at line 43 of file dim-vector.cc.

References make_unique(), ndims(), and rep.

Referenced by Array< T >::assign(), and zero_dims_inquire().

void dim_vector::chop_trailing_singletons ( void   )  [inline]
octave_idx_type* dim_vector::clonerep ( void   )  [inline, private]

Definition at line 79 of file dim-vector.h.

octave_idx_type dim_vector::compute_index ( const octave_idx_type idx  )  const [inline]
octave_idx_type dim_vector::compute_index ( const octave_idx_type idx,
int  nidx 
) const [inline]

Definition at line 433 of file dim-vector.h.

bool dim_vector::concat ( const dim_vector dvb,
int  dim 
)
octave_idx_type& dim_vector::count ( void   )  const [inline, private]

Definition at line 63 of file dim-vector.h.

octave_idx_type dim_vector::cum_compute_index ( const octave_idx_type idx  )  const [inline]

Definition at line 476 of file dim-vector.h.

Referenced by do_bsxfun_op(), and do_inplace_bsxfun_op().

dim_vector dim_vector::cumulative ( void   )  const [inline]

Definition at line 461 of file dim-vector.h.

References rep.

Referenced by convolve().

octave_idx_type dim_vector::dim_max ( void   )  [static]

Definition at line 37 of file dim-vector.cc.

References max().

Referenced by DEFUN(), and safe_numel().

octave_idx_type& dim_vector::elem ( int  i  )  [inline]

Definition at line 183 of file dim-vector.h.

Referenced by num_ones(), squeeze(), and str().

octave_idx_type dim_vector::elem ( int  i  )  const [inline]

Definition at line 192 of file dim-vector.h.

bool dim_vector::empty_2d ( void   )  const [inline]

Definition at line 300 of file dim-vector.h.

References elem.

int dim_vector::first_non_singleton ( int  def = 0  )  const [inline]
void dim_vector::freerep ( void   )  [inline, private]

Definition at line 122 of file dim-vector.h.

bool dim_vector::hvcat ( const dim_vector dvb,
int  dim 
)
int dim_vector::increment_index ( octave_idx_type idx,
int  start = 0 
) const [inline]

Definition at line 446 of file dim-vector.h.

Referenced by do_bsxfun_op(), do_inplace_bsxfun_op(), do_mat2cell(), and do_mat2cell_nd().

bool dim_vector::is_vector ( void   )  const [inline]
int dim_vector::length ( void   )  const [inline]

Definition at line 261 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(), Sparse< T >::compute_index(), DEFCONSTFUN(), DEFUN(), DEFUN_DLD(), Array< T >::diag(), do_cellslices_nda(), do_diff(), do_fft(), do_fft2(), do_fftn(), do_mx_diff_op(), do_mx_minmax_op(), do_mx_red_op(), do_num2cell_helper(), do_trilu(), fill_matrix(), filter(), OCTAVE_VALUE_INT_MATRIX_T::float_complex_matrix_value(), OCTAVE_VALUE_INT_MATRIX_T::float_matrix_value(), FloatNDArray::fourier(), FloatComplexNDArray::fourier(), NDArray::fourier(), ComplexNDArray::fourier(), FloatNDArray::fourierNd(), FloatComplexNDArray::fourierNd(), NDArray::fourierNd(), ComplexNDArray::fourierNd(), freeze(), get_dims_str(), get_extent_triplet(), 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(), FloatNDArray::ifourier(), FloatComplexNDArray::ifourier(), NDArray::ifourier(), ComplexNDArray::ifourier(), FloatNDArray::ifourierNd(), FloatComplexNDArray::ifourierNd(), NDArray::ifourierNd(), ComplexNDArray::ifourierNd(), increment_index(), ind2sub(), Sparse< T >::index(), index_in_bounds(), tm_const::init(), FloatComplexNDArray::insert(), ComplexNDArray::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(), Sparse< bool >::ndims(), Array< octave_value >::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_scalar_struct::save_ascii(), octave_struct::save_ascii(), octave_char_matrix_str::save_ascii(), octave_matrix::save_ascii(), octave_float_matrix::save_ascii(), octave_float_complex_matrix::save_ascii(), octave_complex_matrix::save_ascii(), octave_cell::save_ascii(), octave_bool_matrix::save_ascii(), octave_base_int_matrix< T >::save_ascii(), octave_struct::save_binary(), octave_char_matrix_str::save_binary(), octave_sparse_matrix::save_binary(), octave_matrix::save_binary(), octave_float_matrix::save_binary(), octave_float_complex_matrix::save_binary(), octave_sparse_complex_matrix::save_binary(), octave_complex_matrix::save_binary(), octave_cell::save_binary(), octave_sparse_bool_matrix::save_binary(), octave_bool_matrix::save_binary(), octave_base_int_matrix< T >::save_binary(), scalar(), octave_class::size(), octave_base_value::size(), octave_lazy_index::sort(), Array< T >::sort(), Sparse< T >::Sparse(), squeeze(), str(), try_cellfun_internal_ops(), update_index(), vector_equivalent(), and zero_dims_inquire().

void dim_vector::make_unique ( void   )  [inline, private]

Definition at line 128 of file dim-vector.h.

References OCTREFCOUNT_ATOMIC_DECREMENT.

Referenced by chop_all_singletons(), and concat().

octave_idx_type& dim_vector::ndims ( void   )  const [inline, private]

Definition at line 61 of file dim-vector.h.

Referenced by chop_all_singletons(), and concat().

static octave_idx_type* dim_vector::newrep ( int  ndims  )  [inline, static, private]

Definition at line 67 of file dim-vector.h.

static octave_idx_type* dim_vector::nil_rep ( void   )  [inline, static, private]

Definition at line 217 of file dim-vector.h.

References rep.

int dim_vector::num_ones ( void   )  const

Definition at line 81 of file dim-vector.cc.

References elem(), and length().

octave_idx_type dim_vector::numel ( int  n = 0  )  const [inline]

Definition at line 338 of file dim-vector.h.

References elem.

Referenced by airy(), betainc(), biry(), Array< T >::column(), compute_index(), octave_sparse_matrix::convert_to_str_internal(), octave_matrix::convert_to_str_internal(), octave_float_matrix::convert_to_str_internal(), octave_base_int_matrix< T >::convert_to_str_internal(), DEFUN(), DEFUN_DLD(), dims_to_numel(), do_bessel(), do_bsxfun_op(), do_inplace_bsxfun_op(), do_object2cell(), filter(), Array< T >::find(), gammainc(), get_extent_triplet(), get_ra_idx(), ind2sub(), octave_base_sparse< T >::is_true(), octave_base_matrix< MT >::is_true(), octave_char_matrix_str::load_ascii(), octave_cell::load_ascii(), octave_char_matrix_str::load_binary(), octave_matrix::load_binary(), octave_float_matrix::load_binary(), octave_float_complex_matrix::load_binary(), octave_complex_matrix::load_binary(), octave_cell::load_binary(), octave_bool_matrix::load_binary(), octave_base_int_matrix< T >::load_binary(), make_vector_dims(), SparseMatrix::max(), SparseComplexMatrix::max(), SparseMatrix::min(), SparseComplexMatrix::min(), octave_class::numel(), octave_base_value::numel(), octave_print_internal_template(), Array< T >::page(), read_mat5_binary_element(), Sparse< T >::reshape(), octave_scalar::resize(), OCTAVE_VALUE_INT_SCALAR_T::resize(), octave_float_complex::resize(), octave_float_scalar::resize(), octave_complex::resize(), octave_bool::resize(), octave_char_matrix_str::save_ascii(), octave_cell::save_ascii(), octave_char_matrix_str::save_binary(), octave_matrix::save_binary(), octave_float_matrix::save_binary(), octave_float_complex_matrix::save_binary(), octave_complex_matrix::save_binary(), octave_cell::save_binary(), save_mat5_binary_element(), and Array< T >::sort().

octave_idx_type& dim_vector::operator() ( int  i  )  [inline]

Definition at line 263 of file dim-vector.h.

References elem.

octave_idx_type dim_vector::operator() ( int  i  )  const [inline]

Definition at line 265 of file dim-vector.h.

References elem.

dim_vector& dim_vector::operator= ( const dim_vector dv  )  [inline]

Definition at line 241 of file dim-vector.h.

References OCTREFCOUNT_ATOMIC_DECREMENT, OCTREFCOUNT_ATOMIC_INCREMENT, and rep.

dim_vector dim_vector::redim ( int  n  )  const
void dim_vector::resize ( int  n,
int  fill_value = 0 
) [inline]
octave_idx_type* dim_vector::resizerep ( int  n,
octave_idx_type  fill_value 
) [inline, private]

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(), and Sparse< bool >::numel().

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().

std::string dim_vector::str ( char  sep = 'x'  )  const
bool dim_vector::zero_by_zero ( void   )  const [inline]

Friends And Related Function Documentation

bool operator== ( const dim_vector a,
const dim_vector b 
) [friend]

Definition at line 491 of file dim-vector.h.


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines