GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "idx-vector.h"
Classes | |
class | idx_base_rep |
class | idx_colon_rep |
class | idx_mask_rep |
class | idx_range_rep |
class | idx_scalar_rep |
class | idx_vector_rep |
Public Types | |
enum | idx_class_type { class_invalid = -1, class_colon = 0, class_range, class_scalar, class_vector, class_mask } |
Static Public Member Functions | |
static idx_vector | make_range (octave_idx_type start, octave_idx_type step, octave_idx_type len) |
Static Public Attributes | |
static const idx_vector | colon |
Private Types | |
enum | direct { DIRECT } |
Private Member Functions | |
idx_vector (idx_base_rep *r) | |
void | chkerr (void) |
Static Private Member Functions | |
static idx_vector_rep * | err_rep (void) |
static idx_vector_rep * | nil_rep (void) |
Private Attributes | |
idx_base_rep * | rep |
Friends | |
std::ostream & | operator<< (std::ostream &os, const idx_vector &a) |
template<class T > | |
class | std::auto_ptr |
Definition at line 50 of file idx-vector.h.
|
private |
Enumerator | |
---|---|
DIRECT |
Definition at line 155 of file idx-vector.h.
Enumerator | |
---|---|
class_invalid | |
class_colon | |
class_range | |
class_scalar | |
class_vector | |
class_mask |
Definition at line 56 of file idx-vector.h.
|
inlineprivate |
Definition at line 430 of file idx-vector.h.
|
inline |
Definition at line 464 of file idx-vector.h.
Referenced by complement(), and maybe_reduce().
|
inline |
Definition at line 467 of file idx-vector.h.
|
inline |
Definition at line 470 of file idx-vector.h.
|
inline |
Definition at line 482 of file idx-vector.h.
|
inline |
Definition at line 487 of file idx-vector.h.
|
inline |
Definition at line 495 of file idx-vector.h.
|
inline |
Definition at line 500 of file idx-vector.h.
|
inline |
Definition at line 502 of file idx-vector.h.
|
inline |
Definition at line 504 of file idx-vector.h.
|
inline |
Definition at line 507 of file idx-vector.h.
|
inline |
Definition at line 510 of file idx-vector.h.
Definition at line 513 of file idx-vector.h.
Definition at line 516 of file idx-vector.h.
Definition at line 776 of file idx-vector.cc.
References Array< FloatComplex >::nnz(), Array< T >::nnz(), Array< T >::numel(), and rep.
|
inline |
Definition at line 521 of file idx-vector.h.
Definition at line 525 of file idx-vector.h.
|
inline |
Definition at line 528 of file idx-vector.h.
|
inline |
Definition at line 530 of file idx-vector.h.
Array< octave_idx_type > idx_vector::as_array | ( | void | ) | const |
Definition at line 1277 of file idx-vector.cc.
References idx_vector::idx_base_rep::as_array(), and rep.
Referenced by Sparse< T >::index(), octave_lazy_index::is_sorted(), octave_matrix::is_sorted(), octave_lazy_index::is_sorted_rows(), octave_matrix::is_sorted_rows(), octave_lazy_index::permute(), raw(), octave_lazy_index::reshape(), octave_matrix::reshape(), octave_lazy_index::sort(), octave_lazy_index::sort_rows_idx(), octave_lazy_index::squeeze(), and octave_matrix::squeeze().
|
inline |
Definition at line 695 of file idx-vector.h.
References idx_vector::idx_mask_rep::extent(), idx_vector::idx_scalar_rep::get_data(), idx_vector::idx_vector_rep::get_data(), idx_vector::idx_mask_rep::get_data(), idx_vector::idx_range_rep::get_start(), and idx_vector::idx_range_rep::get_step().
Referenced by Array< T >::assign(), and rec_index_helper::do_assign().
|
inline |
|
inline |
Definition at line 560 of file idx-vector.h.
Referenced by octave_lazy_index::fast_elem_extract().
|
inlineprivate |
Definition at line 450 of file idx-vector.h.
Referenced by freeze().
idx_vector idx_vector::complement | ( | octave_idx_type | n | ) | const |
Definition at line 1113 of file idx-vector.cc.
References class_mask, Array< FloatComplex >::data(), idx_vector::idx_mask_rep::extent(), extent(), fill(), Array< T >::fortran_vec(), idx_vector::idx_mask_rep::get_data(), idx_class(), idx_vector(), idx_vector::idx_mask_rep::length(), length(), and rep.
Referenced by Sparse< T >::delete_elements(), and Array< T >::delete_elements().
void idx_vector::copy_data | ( | octave_idx_type * | data | ) | const |
Definition at line 1055 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_scalar, class_vector, current_liboctave_error_handler, idx_vector::idx_mask_rep::extent(), idx_vector::idx_scalar_rep::get_data(), idx_vector::idx_vector_rep::get_data(), idx_vector::idx_mask_rep::get_data(), idx_vector::idx_range_rep::get_start(), idx_vector::idx_range_rep::get_step(), idx_vector::idx_base_rep::idx_class(), idx_vector::idx_base_rep::length(), and rep.
Referenced by Sparse< T >::assign().
|
inline |
Definition at line 1029 of file idx-vector.h.
Referenced by increment().
|
inlinestaticprivate |
Definition at line 441 of file idx-vector.h.
References idx_vector::idx_base_rep::err.
|
inline |
Definition at line 554 of file idx-vector.h.
Referenced by Array< T >::assign(), Sparse< T >::assign(), complement(), Sparse< T >::delete_elements(), Array< T >::delete_elements(), do_accumarray_minmax(), do_accumarray_sum(), do_accumdim_sum(), Fisindex(), freeze(), MArray< T >::idx_add(), MArray< T >::idx_add_nd(), MArray< T >::idx_max(), MArray< T >::idx_min(), ind2sub(), Range::index(), Array< T >::index(), Sparse< T >::index(), is_permutation(), octave_lazy_index::permute(), raw(), octave_lazy_index::reshape(), octave_matrix::reshape(), octave_lazy_index::sort(), Sparse< T >::Sparse(), octave_lazy_index::squeeze(), octave_matrix::squeeze(), sub2ind(), and zero_dims_inquire().
|
inline |
Definition at line 767 of file idx-vector.h.
References idx_vector::idx_mask_rep::extent(), idx_vector::idx_scalar_rep::get_data(), idx_vector::idx_vector_rep::get_data(), idx_vector::idx_mask_rep::get_data(), idx_vector::idx_range_rep::get_start(), and idx_vector::idx_range_rep::get_step().
Referenced by Array< T >::assign(), complement(), and rec_index_helper::do_fill().
octave_idx_type idx_vector::freeze | ( | octave_idx_type | z_len, |
const char * | tag, | ||
bool | resize_ok = false |
||
) |
Definition at line 1289 of file idx-vector.cc.
References chkerr(), idx_vector::idx_base_rep::err, extent(), length(), and rep.
|
inline |
Definition at line 549 of file idx-vector.h.
Referenced by complement(), inverse_permutation(), is_vector(), maybe_reduce(), Array< T >::nth_element(), octave_value::octave_value(), unconvert(), and unmask().
octave_idx_type idx_vector::increment | ( | void | ) | const |
Definition at line 1012 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_vector, elem(), idx_vector::idx_base_rep::idx_class(), length(), and rep.
Referenced by Sparse< T >::assign(), Sparse< T >::index(), inverse_permutation(), octave_lazy_index::is_sorted(), and Array< T >::nth_element().
|
inline |
Definition at line 621 of file idx-vector.h.
References idx_vector::idx_mask_rep::extent(), idx_vector::idx_scalar_rep::get_data(), idx_vector::idx_vector_rep::get_data(), idx_vector::idx_mask_rep::get_data(), idx_vector::idx_range_rep::get_start(), and idx_vector::idx_range_rep::get_step().
Referenced by rec_index_helper::do_index(), Array< T >::index(), and ft_render::render().
idx_vector idx_vector::inverse_permutation | ( | octave_idx_type | n | ) | const |
Definition at line 1174 of file idx-vector.cc.
References class_range, class_vector, DIRECT, idx_vector::idx_vector_rep::extent(), idx_vector::idx_vector_rep::get_data(), idx_class(), increment(), length(), orig_dimensions(), rep, sorted(), and Array< T >::xelem().
Referenced by Sparse< T >::assign(), and Sparse< T >::index().
|
inline |
Definition at line 575 of file idx-vector.h.
Referenced by Sparse< T >::assign(), Sparse< T >::delete_elements(), Array< T >::delete_elements(), octave_diag_matrix::do_index_op(), octave_perm_matrix::do_index_op(), Range::index(), Array< T >::index(), Sparse< T >::index(), ones_count(), and zero_dims_inquire().
|
inline |
Definition at line 584 of file idx-vector.h.
Referenced by Array< T >::assign(), Sparse< T >::assign(), Sparse< T >::delete_elements(), octave_base_diag< DMT, MT >::do_index_op(), Sparse< T >::index(), is_permutation(), and maybe_reduce().
|
inline |
Definition at line 1032 of file idx-vector.h.
bool idx_vector::is_cont_range | ( | octave_idx_type | n, |
octave_idx_type & | l, | ||
octave_idx_type & | u | ||
) | const |
Definition at line 958 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_scalar, idx_vector::idx_mask_rep::extent(), idx_vector::idx_scalar_rep::get_data(), idx_vector::idx_range_rep::get_start(), idx_vector::idx_range_rep::get_step(), idx_vector::idx_base_rep::idx_class(), idx_vector::idx_range_rep::length(), idx_vector::idx_mask_rep::length(), and rep.
Referenced by Sparse< T >::assign(), Sparse< T >::delete_elements(), Array< T >::delete_elements(), Array< T >::index(), Sparse< T >::index(), and rec_index_helper::is_cont_range().
bool idx_vector::is_permutation | ( | octave_idx_type | n | ) | const |
Definition at line 1145 of file idx-vector.cc.
References extent(), is_colon_equiv(), left, length(), OCTAVE_LOCAL_BUFFER_INIT, and xelem().
Referenced by Sparse< T >::assign(), octave_diag_matrix::do_index_op(), octave_perm_matrix::do_index_op(), Sparse< T >::index(), and PermMatrix::setup().
|
inline |
Definition at line 581 of file idx-vector.h.
Referenced by Sparse< T >::assign(), Sparse< T >::index(), octave_lazy_index::is_sorted(), and sub2ind().
|
inline |
Definition at line 578 of file idx-vector.h.
Referenced by octave_base_matrix< MT >::assign(), Array< T >::delete_elements(), octave_perm_matrix::do_index_op(), octave_base_diag< DMT, MT >::do_index_op(), octave_base_matrix< MT >::do_index_op(), octave_range::do_index_op(), ind2sub(), Array< T >::index(), Sparse< T >::index(), and zero_dims_inquire().
bool idx_vector::is_vector | ( | void | ) | const |
Definition at line 1283 of file idx-vector.cc.
References class_vector, idx_class(), dim_vector::is_vector(), and orig_dimensions().
Referenced by Sparse< T >::assign(), and Sparse< T >::index().
|
inline |
Definition at line 551 of file idx-vector.h.
Referenced by Array< T >::assign(), Sparse< T >::assign(), complement(), Sparse< T >::delete_elements(), Array< T >::delete_elements(), dims_to_numel(), do_accumarray_minmax(), do_accumarray_sum(), do_accumdim_sum(), rec_index_helper::do_assign(), rec_index_helper::do_fill(), rec_index_helper::do_index(), octave_base_diag< DMT, MT >::do_index_op(), freeze(), MArray< T >::idx_add(), MArray< T >::idx_add_nd(), MArray< T >::idx_max(), MArray< T >::idx_min(), increment(), ind2sub(), Range::index(), Array< T >::index(), Sparse< T >::index(), inverse_permutation(), is_permutation(), Array< T >::nth_element(), ones_count(), PermMatrix::setup(), Sparse< T >::Sparse(), sub2ind(), and octave_lazy_index::try_narrowing_conversion().
|
inline |
Definition at line 837 of file idx-vector.h.
References idx_vector::idx_mask_rep::extent(), idx_vector::idx_scalar_rep::get_data(), idx_vector::idx_vector_rep::get_data(), idx_vector::idx_mask_rep::get_data(), idx_vector::idx_range_rep::get_start(), and idx_vector::idx_range_rep::get_step().
Referenced by MArray< T >::idx_add(), MArray< T >::idx_add_nd(), MArray< T >::idx_max(), MArray< T >::idx_min(), and Range::index().
|
inlinestatic |
Definition at line 476 of file idx-vector.h.
Referenced by convolve(), G__osmesa_print__(), and sub2ind().
|
inline |
Definition at line 1043 of file idx-vector.h.
Referenced by idx_vector::idx_vector_rep::idx_vector_rep().
bool idx_vector::maybe_reduce | ( | octave_idx_type | n, |
const idx_vector & | j, | ||
octave_idx_type | nj | ||
) |
Definition at line 789 of file idx-vector.cc.
References class_colon, class_range, class_scalar, DIRECT, idx_vector::idx_scalar_rep::get_data(), idx_vector::idx_range_rep::get_start(), idx_vector::idx_range_rep::get_step(), idx_vector::idx_base_rep::idx_class(), idx_class(), idx_vector(), idx_vector::idx_base_rep::is_colon_equiv(), is_colon_equiv(), idx_vector::idx_base_rep::length(), idx_vector::idx_range_rep::length(), and rep.
Referenced by Array< T >::assign(), and Array< T >::index().
|
inlinestaticprivate |
Definition at line 434 of file idx-vector.h.
octave_idx_type idx_vector::ones_count | ( | void | ) | const |
Definition at line 1303 of file idx-vector.cc.
References is_colon(), length(), and xelem().
|
inline |
Definition at line 572 of file idx-vector.h.
|
inline |
Definition at line 563 of file idx-vector.h.
|
inline |
Definition at line 536 of file idx-vector.h.
References idx_vector::idx_base_rep::count, and rep.
|
inline |
Definition at line 598 of file idx-vector.h.
|
inline |
Definition at line 593 of file idx-vector.h.
Referenced by Sparse< T >::delete_elements(), ind2sub(), Range::index(), Array< T >::index(), Sparse< T >::index(), inverse_permutation(), is_vector(), octave_lazy_index::sort(), and octave_lazy_index::try_narrowing_conversion().
|
inline |
Definition at line 601 of file idx-vector.h.
|
inline |
Definition at line 595 of file idx-vector.h.
|
inline |
Definition at line 606 of file idx-vector.h.
const octave_idx_type * idx_vector::raw | ( | void | ) |
Definition at line 1042 of file idx-vector.cc.
References as_array(), class_vector, extent(), idx_vector::idx_vector_rep::get_data(), idx_vector::idx_base_rep::idx_class(), and rep.
Referenced by Sparse< T >::delete_elements(), Sparse< T >::index(), Sparse< T >::Sparse(), and zunhj().
|
inline |
Definition at line 1038 of file idx-vector.h.
|
inline |
Definition at line 587 of file idx-vector.h.
Referenced by Sparse< T >::assign(), Sparse< T >::delete_elements(), inverse_permutation(), octave_lazy_index::sort(), and Sparse< T >::Sparse().
|
inline |
Definition at line 590 of file idx-vector.h.
void idx_vector::unconvert | ( | idx_class_type & | iclass, |
double & | scalar, | ||
Range & | range, | ||
Array< double > & | array, | ||
Array< bool > & | mask | ||
) | const |
Definition at line 1232 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_scalar, class_vector, idx_class(), rep, idx_vector::idx_range_rep::unconvert(), idx_vector::idx_scalar_rep::unconvert(), idx_vector::idx_vector_rep::unconvert(), and idx_vector::idx_mask_rep::unconvert().
Referenced by octave_value::octave_value().
idx_vector idx_vector::unmask | ( | void | ) | const |
Definition at line 1209 of file idx-vector.cc.
References class_mask, Array< FloatComplex >::data(), DIRECT, idx_vector::idx_mask_rep::extent(), idx_vector::idx_mask_rep::get_data(), idx_class(), idx_vector::idx_mask_rep::length(), idx_vector::idx_mask_rep::orig_dimensions(), and rep.
Referenced by Ffind().
|
inline |
Definition at line 557 of file idx-vector.h.
Referenced by Array< T >::assign(), idx_vector::idx_vector_rep::checkelem(), idx_vector::idx_mask_rep::checkelem(), Array< T >::index(), is_permutation(), and ones_count().
|
friend |
Definition at line 608 of file idx-vector.h.
|
friend |
Definition at line 66 of file idx-vector.h.
|
static |
Definition at line 492 of file idx-vector.h.
Referenced by Sparse< T >::assign(), Sparse< T >::cat(), Array< T >::cat(), Matrix::column(), FloatMatrix::column(), ComplexMatrix::column(), FloatComplexMatrix::column(), octave_map::column(), Sparse< T >::delete_elements(), Array< T >::delete_elements(), do_cellslices_nda(), do_mat2cell_nd(), F__ilutp__(), Fcell2struct(), G__osmesa_print__(), ilu_tp(), Sparse< T >::index(), octave_map::page(), prepare_idx(), Matrix::row(), FloatMatrix::row(), ComplexMatrix::row(), and FloatComplexMatrix::row().
|
private |
Definition at line 1047 of file idx-vector.h.
Referenced by as_array(), complement(), copy_data(), freeze(), idx_vector(), increment(), inverse_permutation(), is_cont_range(), maybe_reduce(), operator=(), raw(), unconvert(), and unmask().