#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) | |
Static Private Member Functions | |
static OCTAVE_API idx_vector_rep * | nil_rep (void) |
Private Attributes | |
idx_base_rep * | m_rep |
Friends | |
std::ostream & | operator<< (std::ostream &os, const idx_vector &a) |
template<typename T , typename D > | |
class | std::unique_ptr |
Definition at line 57 of file idx-vector.h.
|
private |
Enumerator | |
---|---|
DIRECT |
Definition at line 161 of file idx-vector.h.
Enumerator | |
---|---|
class_invalid | |
class_colon | |
class_range | |
class_scalar | |
class_vector | |
class_mask |
Definition at line 63 of file idx-vector.h.
|
inlineprivate |
Definition at line 439 of file idx-vector.h.
|
inline |
Definition at line 448 of file idx-vector.h.
Referenced by complement(), maybe_reduce(), and raw().
|
inline |
Definition at line 451 of file idx-vector.h.
|
inline |
Definition at line 464 of file idx-vector.h.
|
inline |
Definition at line 475 of file idx-vector.h.
|
inline |
Definition at line 479 of file idx-vector.h.
|
inline |
Definition at line 486 of file idx-vector.h.
|
inline |
Definition at line 491 of file idx-vector.h.
|
inline |
Definition at line 493 of file idx-vector.h.
|
inline |
Definition at line 495 of file idx-vector.h.
|
inline |
Definition at line 498 of file idx-vector.h.
|
inline |
Definition at line 501 of file idx-vector.h.
Definition at line 504 of file idx-vector.h.
Definition at line 506 of file idx-vector.h.
Definition at line 735 of file idx-vector.cc.
References m_rep, Array< T, Alloc >::nnz(), and Array< T, Alloc >::numel().
Definition at line 510 of file idx-vector.h.
Definition at line 512 of file idx-vector.h.
|
inline |
Definition at line 514 of file idx-vector.h.
|
inline |
Definition at line 516 of file idx-vector.h.
Array< octave_idx_type > octave::idx_vector::as_array | ( | void | ) | const |
Definition at line 1225 of file idx-vector.cc.
References octave::idx_vector::idx_base_rep::as_array(), and m_rep.
Referenced by Sparse< T, Alloc >::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 676 of file idx-vector.h.
References octave::idx_vector::idx_mask_rep::extent(), octave::idx_vector::idx_scalar_rep::get_data(), octave::idx_vector::idx_vector_rep::get_data(), octave::idx_vector::idx_mask_rep::get_data(), octave::idx_vector::idx_range_rep::get_start(), octave::idx_vector::idx_range_rep::get_step(), and len.
Referenced by Array< T, Alloc >::assign(), and rec_index_helper::do_assign().
|
inline |
Definition at line 886 of file idx-vector.h.
References octave::idx_vector::idx_mask_rep::extent(), octave::idx_vector::idx_scalar_rep::get_data(), octave::idx_vector::idx_vector_rep::get_data(), octave::idx_vector::idx_mask_rep::get_data(), octave::idx_vector::idx_range_rep::get_start(), octave::idx_vector::idx_range_rep::get_step(), and len.
|
inline |
Definition at line 546 of file idx-vector.h.
Referenced by octave_lazy_index::fast_elem_extract().
idx_vector octave::idx_vector::complement | ( | octave_idx_type | n | ) | const |
Definition at line 1066 of file idx-vector.cc.
References idx_vector(), class_mask, octave::idx_vector::idx_mask_rep::extent(), extent(), fill(), Array< T, Alloc >::fortran_vec(), octave::idx_vector::idx_mask_rep::get_data(), idx_class(), length(), octave::idx_vector::idx_mask_rep::length(), and m_rep.
Referenced by Array< T, Alloc >::delete_elements(), and Sparse< T, Alloc >::delete_elements().
void octave::idx_vector::copy_data | ( | octave_idx_type * | data | ) | const |
Definition at line 1009 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_scalar, class_vector, octave::idx_vector::idx_mask_rep::extent(), octave::idx_vector::idx_scalar_rep::get_data(), octave::idx_vector::idx_vector_rep::get_data(), octave::idx_vector::idx_mask_rep::get_data(), octave::idx_vector::idx_range_rep::get_start(), octave::idx_vector::idx_range_rep::get_step(), octave::idx_vector::idx_base_rep::idx_class(), octave::idx_vector::idx_base_rep::length(), and m_rep.
Referenced by Sparse< T, Alloc >::assign().
|
inline |
Definition at line 1011 of file idx-vector.h.
Referenced by increment().
|
inline |
Definition at line 540 of file idx-vector.h.
Referenced by Sparse< T, Alloc >::Sparse(), Array< T, Alloc >::assign(), Sparse< T, Alloc >::assign(), complement(), Array< T, Alloc >::delete_elements(), Sparse< T, Alloc >::delete_elements(), do_accumarray_minmax(), do_accumarray_sum(), do_accumdim_sum(), Fisindex(), freeze(), MArray< T >::idx_add(), MArray< T >::idx_add_nd(), MArray< double >::idx_max(), MArray< T >::idx_max(), ind2sub(), octave::range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::index(), Range::index(), Array< T, Alloc >::index(), Sparse< T, Alloc >::index(), is_permutation(), octave_lazy_index::permute(), raw(), octave_lazy_index::reshape(), octave_matrix::reshape(), octave_lazy_index::sort(), octave_lazy_index::squeeze(), octave_matrix::squeeze(), sub2ind(), and zero_dims_inquire().
|
inline |
Definition at line 748 of file idx-vector.h.
References octave::idx_vector::idx_mask_rep::extent(), octave::idx_vector::idx_scalar_rep::get_data(), octave::idx_vector::idx_vector_rep::get_data(), octave::idx_vector::idx_mask_rep::get_data(), octave::idx_vector::idx_range_rep::get_start(), octave::idx_vector::idx_range_rep::get_step(), and len.
Referenced by Array< T, Alloc >::assign(), complement(), and rec_index_helper::do_fill().
octave_idx_type octave::idx_vector::freeze | ( | octave_idx_type | z_len, |
const char * | tag, | ||
bool | resize_ok = false |
||
) |
Definition at line 1236 of file idx-vector.cc.
|
inline |
Definition at line 535 of file idx-vector.h.
Referenced by complement(), inverse_permutation(), isvector(), maybe_reduce(), Array< T, Alloc >::nth_element(), unconvert(), and unmask().
octave_idx_type octave::idx_vector::increment | ( | void | ) | const |
Definition at line 968 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_vector, elem(), octave::idx_vector::idx_base_rep::idx_class(), length(), and m_rep.
Referenced by Sparse< T, Alloc >::assign(), Sparse< T, Alloc >::index(), inverse_permutation(), octave_lazy_index::issorted(), and Array< T, Alloc >::nth_element().
|
inline |
Definition at line 602 of file idx-vector.h.
References octave::idx_vector::idx_mask_rep::extent(), octave::idx_vector::idx_scalar_rep::get_data(), octave::idx_vector::idx_vector_rep::get_data(), octave::idx_vector::idx_mask_rep::get_data(), octave::idx_vector::idx_range_rep::get_start(), octave::idx_vector::idx_range_rep::get_step(), and len.
Referenced by Array< octave_value >::checkelem().
idx_vector octave::idx_vector::inverse_permutation | ( | octave_idx_type | n | ) | const |
Definition at line 1124 of file idx-vector.cc.
References class_range, class_vector, DIRECT, octave::idx_vector::idx_vector_rep::extent(), octave::idx_vector::idx_vector_rep::get_data(), idx_class(), increment(), length(), m_rep, orig_dimensions(), sorted(), and Array< T, Alloc >::xelem().
Referenced by Sparse< T, Alloc >::assign(), and Sparse< T, Alloc >::index().
|
inline |
Definition at line 556 of file idx-vector.h.
Referenced by Sparse< T, Alloc >::assign(), Array< T, Alloc >::delete_elements(), Sparse< T, Alloc >::delete_elements(), octave_perm_matrix::do_index_op(), octave_diag_matrix::do_index_op(), octave::range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::index(), Range::index(), Sparse< T, Alloc >::index(), ones_count(), and zero_dims_inquire().
|
inline |
Definition at line 565 of file idx-vector.h.
Referenced by Array< T, Alloc >::assign(), Sparse< T, Alloc >::assign(), Sparse< T, Alloc >::delete_elements(), octave_base_diag< ComplexDiagMatrix, ComplexMatrix >::diag(), Sparse< T, Alloc >::index(), is_permutation(), and maybe_reduce().
|
inline |
Definition at line 1014 of file idx-vector.h.
bool octave::idx_vector::is_cont_range | ( | octave_idx_type | n, |
octave_idx_type & | l, | ||
octave_idx_type & | u | ||
) | const |
Definition at line 915 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_scalar, octave::idx_vector::idx_mask_rep::extent(), octave::idx_vector::idx_scalar_rep::get_data(), octave::idx_vector::idx_range_rep::get_start(), octave::idx_vector::idx_range_rep::get_step(), octave::idx_vector::idx_base_rep::idx_class(), octave::idx_vector::idx_range_rep::length(), octave::idx_vector::idx_mask_rep::length(), and m_rep.
Referenced by Sparse< T, Alloc >::assign(), Array< T, Alloc >::delete_elements(), Sparse< T, Alloc >::delete_elements(), and Sparse< T, Alloc >::index().
bool octave::idx_vector::is_permutation | ( | octave_idx_type | n | ) | const |
Definition at line 1096 of file idx-vector.cc.
References extent(), is_colon_equiv(), octave::left, length(), OCTAVE_LOCAL_BUFFER_INIT, and xelem().
Referenced by Sparse< T, Alloc >::assign(), octave_perm_matrix::do_index_op(), octave_diag_matrix::do_index_op(), Sparse< T, Alloc >::index(), and PermMatrix::setup().
|
inline |
Definition at line 562 of file idx-vector.h.
Referenced by Sparse< T, Alloc >::assign(), Sparse< T, Alloc >::index(), octave_lazy_index::issorted(), and sub2ind().
|
inline |
Definition at line 559 of file idx-vector.h.
Referenced by octave_base_matrix< MT >::assign(), Array< T, Alloc >::delete_elements(), octave_perm_matrix::do_index_op(), ov_range< T >::do_index_op(), ind2sub(), Array< T, Alloc >::index(), Sparse< T, Alloc >::index(), octave_base_matrix< T >::matrix_type(), octave_base_diag< ComplexDiagMatrix, ComplexMatrix >::resize(), and zero_dims_inquire().
bool octave::idx_vector::isvector | ( | void | ) | const |
Definition at line 1230 of file idx-vector.cc.
References class_vector, idx_class(), dim_vector::isvector(), and orig_dimensions().
Referenced by Sparse< T, Alloc >::assign(), and Sparse< T, Alloc >::index().
|
inline |
Definition at line 537 of file idx-vector.h.
Referenced by Array< T, Alloc >::assign(), Sparse< T, Alloc >::assign(), Array< octave_value >::checkelem(), complement(), Array< T, Alloc >::delete_elements(), Sparse< T, Alloc >::delete_elements(), octave_base_diag< ComplexDiagMatrix, ComplexMatrix >::diag(), dims_to_numel(), do_accumarray_minmax(), do_accumarray_sum(), do_accumdim_sum(), rec_index_helper::do_assign(), freeze(), MArray< T >::idx_add(), MArray< T >::idx_add_nd(), MArray< T >::idx_max(), increment(), ind2sub(), octave::range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::index(), Range::index(), Sparse< T, Alloc >::index(), inverse_permutation(), is_permutation(), make_java_index(), Array< T, Alloc >::nth_element(), ones_count(), Array< octave_value >::permute(), PermMatrix::setup(), sub2ind(), and octave_lazy_index::try_narrowing_conversion().
|
inline |
Definition at line 818 of file idx-vector.h.
References octave::idx_vector::idx_mask_rep::extent(), octave::idx_vector::idx_scalar_rep::get_data(), octave::idx_vector::idx_vector_rep::get_data(), octave::idx_vector::idx_mask_rep::get_data(), octave::idx_vector::idx_range_rep::get_start(), octave::idx_vector::idx_range_rep::get_step(), and len.
Referenced by MArray< T >::idx_add(), MArray< T >::idx_add_nd(), MArray< T >::idx_max(), octave::range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::index(), and Range::index().
|
inlinestatic |
Definition at line 469 of file idx-vector.h.
References len.
Referenced by octave::opengl_renderer::get_pixels(), and sub2ind().
|
inline |
Definition at line 1025 of file idx-vector.h.
Referenced by octave::idx_vector::idx_vector_rep::idx_vector_rep().
bool octave::idx_vector::maybe_reduce | ( | octave_idx_type | n, |
const idx_vector & | j, | ||
octave_idx_type | nj | ||
) |
Definition at line 747 of file idx-vector.cc.
References idx_vector(), class_colon, class_range, class_scalar, DIRECT, octave::idx_vector::idx_scalar_rep::get_data(), octave::idx_vector::idx_range_rep::get_start(), octave::idx_vector::idx_range_rep::get_step(), octave::idx_vector::idx_base_rep::idx_class(), idx_class(), is_colon_equiv(), octave::idx_vector::idx_base_rep::is_colon_equiv(), octave::idx_vector::idx_base_rep::length(), octave::idx_vector::idx_range_rep::length(), and m_rep.
Referenced by Array< T, Alloc >::assign().
|
staticprivate |
Definition at line 58 of file idx-vector.cc.
octave_idx_type octave::idx_vector::ones_count | ( | void | ) | const |
Definition at line 1245 of file idx-vector.cc.
References is_colon(), length(), and xelem().
|
inline |
Definition at line 554 of file idx-vector.h.
|
inline |
Definition at line 549 of file idx-vector.h.
|
inline |
Definition at line 522 of file idx-vector.h.
References octave::idx_vector::idx_base_rep::m_count, and m_rep.
|
inline |
Definition at line 579 of file idx-vector.h.
|
inline |
Definition at line 574 of file idx-vector.h.
Referenced by Sparse< T, Alloc >::delete_elements(), ind2sub(), octave::range< T, typename std::enable_if< std::is_floating_point< T >::value >::type >::index(), Range::index(), Sparse< T, Alloc >::index(), inverse_permutation(), isvector(), octave_lazy_index::sort(), and octave_lazy_index::try_narrowing_conversion().
|
inline |
Definition at line 582 of file idx-vector.h.
|
inline |
Definition at line 576 of file idx-vector.h.
|
inline |
Definition at line 587 of file idx-vector.h.
const octave_idx_type * octave::idx_vector::raw | ( | void | ) |
Definition at line 997 of file idx-vector.cc.
References idx_vector(), as_array(), class_vector, extent(), octave::idx_vector::idx_vector_rep::get_data(), octave::idx_vector::idx_base_rep::idx_class(), and m_rep.
Referenced by Sparse< T, Alloc >::delete_elements(), Sparse< T, Alloc >::index(), and Sparse< T >::insert().
|
inline |
Definition at line 1020 of file idx-vector.h.
|
inline |
Definition at line 571 of file idx-vector.h.
|
inline |
Definition at line 568 of file idx-vector.h.
Referenced by Sparse< T, Alloc >::assign(), Sparse< T, Alloc >::delete_elements(), inverse_permutation(), and octave_lazy_index::sort().
void octave::idx_vector::unconvert | ( | idx_class_type & | iclass, |
double & | scalar, | ||
range< double > & | range, | ||
Array< double > & | array, | ||
Array< bool > & | mask | ||
) | const |
Definition at line 1181 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_scalar, class_vector, idx_class(), m_rep, octave::range, scalar(), octave::idx_vector::idx_range_rep::unconvert(), octave::idx_vector::idx_scalar_rep::unconvert(), octave::idx_vector::idx_vector_rep::unconvert(), and octave::idx_vector::idx_mask_rep::unconvert().
idx_vector octave::idx_vector::unmask | ( | void | ) | const |
Definition at line 1158 of file idx-vector.cc.
References class_mask, DIRECT, octave::idx_vector::idx_mask_rep::extent(), octave::idx_vector::idx_mask_rep::get_data(), idx_class(), octave::idx_vector::idx_mask_rep::length(), m_rep, and octave::idx_vector::idx_mask_rep::orig_dimensions().
Referenced by Ffind().
|
inline |
Definition at line 543 of file idx-vector.h.
Referenced by Array< T, Alloc >::assign(), is_permutation(), and ones_count().
|
friend |
Definition at line 589 of file idx-vector.h.
|
friend |
Definition at line 73 of file idx-vector.h.
|
static |
Definition at line 483 of file idx-vector.h.
Referenced by Sparse< T, Alloc >::assign(), Array< T, Alloc >::cat(), Sparse< T, Alloc >::cat(), ComplexMatrix::column(), Matrix::column(), FloatComplexMatrix::column(), FloatMatrix::column(), octave_map::column(), Sparse< T, Alloc >::delete_elements(), Array< T, Alloc >::delete_elements(), do_cellslices_nda(), do_fft(), do_mat2cell_nd(), F__ilutp__(), Fcell2struct(), octave::opengl_renderer::get_pixels(), ilu_tp(), Sparse< T, Alloc >::index(), octave_map::page(), prepare_idx(), ComplexMatrix::row(), Matrix::row(), FloatComplexMatrix::row(), and FloatMatrix::row().
|
private |
Definition at line 1029 of file idx-vector.h.
Referenced by idx_vector(), as_array(), complement(), copy_data(), increment(), inverse_permutation(), is_cont_range(), maybe_reduce(), operator=(), raw(), unconvert(), and unmask().