#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<typename T , typename D > | |
class | std::unique_ptr |
Definition at line 52 of file idx-vector.h.
|
private |
Enumerator | |
---|---|
DIRECT |
Definition at line 158 of file idx-vector.h.
Enumerator | |
---|---|
class_invalid | |
class_colon | |
class_range | |
class_scalar | |
class_vector | |
class_mask |
Definition at line 58 of file idx-vector.h.
|
inlineprivate |
Definition at line 439 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 476 of file idx-vector.h.
|
inline |
Definition at line 488 of file idx-vector.h.
|
inline |
Definition at line 493 of file idx-vector.h.
|
inline |
Definition at line 501 of file idx-vector.h.
|
inline |
Definition at line 506 of file idx-vector.h.
|
inline |
Definition at line 508 of file idx-vector.h.
|
inline |
Definition at line 510 of file idx-vector.h.
|
inline |
Definition at line 513 of file idx-vector.h.
|
inline |
Definition at line 516 of file idx-vector.h.
Definition at line 519 of file idx-vector.h.
Definition at line 522 of file idx-vector.h.
Definition at line 771 of file idx-vector.cc.
References Array< FloatComplex >::nnz(), Array< T >::nnz(), Array< T >::numel(), and rep.
|
inline |
Definition at line 527 of file idx-vector.h.
Definition at line 531 of file idx-vector.h.
|
inline |
Definition at line 534 of file idx-vector.h.
|
inline |
Definition at line 536 of file idx-vector.h.
Array< octave_idx_type > idx_vector::as_array | ( | void | ) | const |
Definition at line 1271 of file idx-vector.cc.
References idx_vector::idx_base_rep::as_array(), and rep.
Referenced by Sparse< bool >::index(), octave_lazy_index::is_sorted_rows(), octave_matrix::is_sorted_rows(), octave_lazy_index::issorted(), octave_matrix::issorted(), 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(), idx_vector::idx_range_rep::get_step(), i, and start.
Referenced by Array< octave_value >::assign(), and rec_index_helper::do_assign().
|
inline |
Definition at line 905 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(), idx_vector::idx_range_rep::get_step(), i, and start.
|
inline |
Definition at line 566 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 1108 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(), i, idx_class(), idx_vector(), idx_vector::idx_mask_rep::length(), length(), rep, and retval.
Referenced by Sparse< bool >::delete_elements().
void idx_vector::copy_data | ( | octave_idx_type * | data | ) | const |
Definition at line 1050 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_scalar, class_vector, Array< FloatComplex >::data(), 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(), i, idx_vector::idx_base_rep::idx_class(), idx_vector::idx_base_rep::length(), rep, and start.
Referenced by Sparse< bool >::assign().
|
inline |
Definition at line 1033 of file idx-vector.h.
Referenced by increment().
|
staticprivate |
Definition at line 65 of file idx-vector.cc.
References idx_vector::idx_base_rep::err.
|
inline |
Definition at line 560 of file idx-vector.h.
Referenced by Sparse< bool >::assign(), Array< octave_value >::assign(), complement(), Sparse< bool >::delete_elements(), freeze(), MArray< Complex >::idx_add(), MArray< Complex >::idx_add_nd(), MArray< Complex >::idx_max(), MArray< Complex >::idx_min(), ind2sub(), Sparse< bool >::index(), Array< octave_value >::index(), is_permutation(), octave_lazy_index::permute(), raw(), octave_lazy_index::reshape(), octave_matrix::reshape(), octave_lazy_index::sort(), Sparse< bool >::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(), idx_vector::idx_range_rep::get_step(), i, start, and val.
Referenced by Array< octave_value >::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 1283 of file idx-vector.cc.
References chkerr(), idx_vector::idx_base_rep::err, extent(), length(), and rep.
|
inline |
Definition at line 555 of file idx-vector.h.
Referenced by complement(), inverse_permutation(), isvector(), maybe_reduce(), Array< octave_value >::nth_element(), unconvert(), and unmask().
octave_idx_type idx_vector::increment | ( | void | ) | const |
Definition at line 1007 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_vector, elem(), idx_vector::idx_base_rep::idx_class(), length(), rep, and retval.
Referenced by Sparse< bool >::assign(), Sparse< bool >::index(), inverse_permutation(), octave_lazy_index::issorted(), and Array< octave_value >::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(), idx_vector::idx_range_rep::get_step(), i, and start.
Referenced by rec_index_helper::do_index(), and Array< octave_value >::index().
idx_vector idx_vector::inverse_permutation | ( | octave_idx_type | n | ) | const |
Definition at line 1168 of file idx-vector.cc.
References class_range, class_vector, DIRECT, idx_vector::idx_vector_rep::extent(), idx_vector::idx_vector_rep::get_data(), i, idx_class(), increment(), length(), orig_dimensions(), rep, retval, sorted(), and Array< T >::xelem().
Referenced by Sparse< bool >::assign(), and Sparse< bool >::index().
|
inline |
Definition at line 575 of file idx-vector.h.
Referenced by Sparse< bool >::assign(), Sparse< bool >::delete_elements(), octave_diag_matrix::do_index_op(), octave_perm_matrix::do_index_op(), Sparse< bool >::index(), Array< octave_value >::index(), ones_count(), and zero_dims_inquire().
|
inline |
Definition at line 584 of file idx-vector.h.
Referenced by Sparse< bool >::assign(), Array< octave_value >::assign(), Sparse< bool >::delete_elements(), octave_base_diag< DiagMatrix, Matrix >::do_index_op(), Sparse< bool >::index(), is_permutation(), and maybe_reduce().
|
inline |
Definition at line 1036 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 953 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(), rep, and u.
Referenced by Sparse< bool >::assign(), Sparse< bool >::delete_elements(), Sparse< bool >::index(), Array< octave_value >::index(), and rec_index_helper::is_cont_range().
bool idx_vector::is_permutation | ( | octave_idx_type | n | ) | const |
Definition at line 1139 of file idx-vector.cc.
References extent(), i, is_colon_equiv(), k, left, length(), OCTAVE_LOCAL_BUFFER_INIT, retval, and xelem().
Referenced by Sparse< bool >::assign(), octave_diag_matrix::do_index_op(), octave_perm_matrix::do_index_op(), Sparse< bool >::index(), and PermMatrix::setup().
|
inline |
Definition at line 581 of file idx-vector.h.
Referenced by Sparse< bool >::assign(), Sparse< bool >::index(), octave_lazy_index::issorted(), and sub2ind().
|
inline |
Definition at line 578 of file idx-vector.h.
Referenced by octave_base_matrix< boolNDArray >::assign(), octave_perm_matrix::do_index_op(), octave_base_diag< DiagMatrix, Matrix >::do_index_op(), octave_base_matrix< boolNDArray >::do_index_op(), ind2sub(), Sparse< bool >::index(), Array< octave_value >::index(), and zero_dims_inquire().
|
inline |
Definition at line 1027 of file idx-vector.h.
References isvector().
bool idx_vector::isvector | ( | void | ) | const |
Definition at line 1277 of file idx-vector.cc.
References class_vector, idx_class(), dim_vector::isvector(), and orig_dimensions().
Referenced by Sparse< bool >::assign(), and Sparse< bool >::index().
|
inline |
Definition at line 557 of file idx-vector.h.
Referenced by Sparse< bool >::assign(), Array< octave_value >::assign(), complement(), Sparse< bool >::delete_elements(), rec_index_helper::do_assign(), rec_index_helper::do_fill(), rec_index_helper::do_index(), octave_base_diag< DiagMatrix, Matrix >::do_index_op(), freeze(), MArray< Complex >::idx_add(), MArray< Complex >::idx_add_nd(), MArray< Complex >::idx_max(), MArray< Complex >::idx_min(), increment(), ind2sub(), Sparse< bool >::index(), Array< octave_value >::index(), inverse_permutation(), is_permutation(), make_java_index(), Array< octave_value >::nth_element(), ones_count(), PermMatrix::setup(), Sparse< bool >::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(), idx_vector::idx_range_rep::get_step(), i, and start.
Referenced by MArray< Complex >::idx_add(), MArray< Complex >::idx_add_nd(), MArray< Complex >::idx_max(), and MArray< Complex >::idx_min().
|
inlinestatic |
Definition at line 482 of file idx-vector.h.
References start.
Referenced by G__osmesa_print__(), octave::opengl_renderer::get_pixels(), and sub2ind().
|
inline |
Definition at line 1047 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 784 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(), k, idx_vector::idx_base_rep::length(), idx_vector::idx_range_rep::length(), rep, s, and t.
Referenced by Array< octave_value >::assign(), and Array< octave_value >::index().
|
staticprivate |
Definition at line 58 of file idx-vector.cc.
octave_idx_type idx_vector::ones_count | ( | void | ) | const |
Definition at line 1298 of file idx-vector.cc.
References i, is_colon(), length(), and xelem().
|
inline |
Definition at line 572 of file idx-vector.h.
|
inline |
Definition at line 569 of file idx-vector.h.
|
inline |
Definition at line 542 of file idx-vector.h.
References a.
|
inline |
Definition at line 598 of file idx-vector.h.
|
inline |
Definition at line 593 of file idx-vector.h.
Referenced by Sparse< bool >::delete_elements(), ind2sub(), Sparse< bool >::index(), inverse_permutation(), isvector(), 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.
References os.
const octave_idx_type * idx_vector::raw | ( | void | ) |
Definition at line 1037 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< bool >::delete_elements(), Sparse< bool >::index(), and Sparse< bool >::Sparse().
Definition at line 1042 of file idx-vector.h.
|
inline |
Definition at line 587 of file idx-vector.h.
Referenced by Sparse< bool >::assign(), Sparse< bool >::delete_elements(), inverse_permutation(), octave_lazy_index::sort(), and Sparse< bool >::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 1226 of file idx-vector.cc.
References array(), class_colon, class_mask, class_range, class_scalar, class_vector, idx_class(), range(), rep, scalar, 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().
idx_vector idx_vector::unmask | ( | void | ) | const |
Definition at line 1203 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(), i, idx_class(), idx_vector::idx_mask_rep::length(), idx_vector::idx_mask_rep::orig_dimensions(), and rep.
|
inline |
Definition at line 563 of file idx-vector.h.
Referenced by Array< octave_value >::assign(), idx_vector::idx_vector_rep::checkelem(), idx_vector::idx_mask_rep::checkelem(), Array< octave_value >::index(), is_permutation(), and ones_count().
|
friend |
Definition at line 608 of file idx-vector.h.
|
friend |
Definition at line 68 of file idx-vector.h.
|
static |
Definition at line 498 of file idx-vector.h.
Referenced by Sparse< bool >::assign(), Sparse< bool >::cat(), Array< octave_value >::cat(), Matrix::column(), FloatMatrix::column(), ComplexMatrix::column(), FloatComplexMatrix::column(), octave_map::column(), Sparse< bool >::delete_elements(), Array< octave_value >::delete_elements(), do_fft(), Fcell2struct(), G__osmesa_print__(), octave::opengl_renderer::get_pixels(), Sparse< bool >::index(), octave_map::page(), Matrix::row(), FloatMatrix::row(), ComplexMatrix::row(), and FloatComplexMatrix::row().
|
private |
Definition at line 1051 of file idx-vector.h.
Referenced by as_array(), complement(), copy_data(), freeze(), idx_vector(), increment(), inverse_permutation(), is_cont_range(), maybe_reduce(), raw(), unconvert(), and unmask().