#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 53 of file idx-vector.h.
|
private |
Enumerator | |
---|---|
DIRECT |
Definition at line 159 of file idx-vector.h.
Enumerator | |
---|---|
class_invalid | |
class_colon | |
class_range | |
class_scalar | |
class_vector | |
class_mask |
Definition at line 59 of file idx-vector.h.
|
inlineprivate |
Definition at line 440 of file idx-vector.h.
|
inline |
Definition at line 465 of file idx-vector.h.
Referenced by complement(), maybe_reduce(), and raw().
|
inline |
Definition at line 468 of file idx-vector.h.
|
inline |
Definition at line 477 of file idx-vector.h.
|
inline |
Definition at line 489 of file idx-vector.h.
|
inline |
Definition at line 494 of file idx-vector.h.
|
inline |
Definition at line 502 of file idx-vector.h.
|
inline |
Definition at line 507 of file idx-vector.h.
|
inline |
Definition at line 509 of file idx-vector.h.
|
inline |
Definition at line 511 of file idx-vector.h.
|
inline |
Definition at line 514 of file idx-vector.h.
|
inline |
Definition at line 517 of file idx-vector.h.
|
inline |
Definition at line 520 of file idx-vector.h.
|
inline |
Definition at line 523 of file idx-vector.h.
idx_vector::idx_vector | ( | const Array< bool > & | nda | ) |
Definition at line 773 of file idx-vector.cc.
References Array< T >::nnz(), Array< T >::numel(), and rep.
|
inline |
Definition at line 528 of file idx-vector.h.
|
inline |
Definition at line 532 of file idx-vector.h.
|
inline |
Definition at line 535 of file idx-vector.h.
|
inline |
Definition at line 537 of file idx-vector.h.
Array< octave_idx_type > idx_vector::as_array | ( | void | ) | const |
Definition at line 1273 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_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 696 of file idx-vector.h.
Referenced by Array< T >::assign(), and rec_index_helper::do_assign().
|
inline |
Definition at line 906 of file idx-vector.h.
|
inline |
Definition at line 567 of file idx-vector.h.
References n.
Referenced by octave_lazy_index::fast_elem_extract().
|
inlineprivate |
Definition at line 451 of file idx-vector.h.
Referenced by freeze().
idx_vector idx_vector::complement | ( | octave_idx_type | n | ) | const |
Definition at line 1110 of file idx-vector.cc.
References idx_vector(), class_mask, extent(), fill(), Array< T >::fortran_vec(), idx_class(), length(), n, r, rep, and retval.
Referenced by Array< T >::delete_elements(), and Sparse< T >::delete_elements().
void idx_vector::copy_data | ( | octave_idx_type * | data | ) | const |
Definition at line 1052 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_scalar, class_vector, idx_vector::idx_base_rep::idx_class(), len, idx_vector::idx_base_rep::length(), r, and rep.
Referenced by Sparse< T >::assign().
|
inline |
|
staticprivate |
Definition at line 67 of file idx-vector.cc.
References idx_vector::idx_base_rep::err.
|
inline |
Definition at line 561 of file idx-vector.h.
References n.
Referenced by Sparse< T >::Sparse(), Array< T >::assign(), Sparse< T >::assign(), MArray< double >::changesign(), complement(), Array< T >::delete_elements(), Sparse< 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_min(), ind2sub(), Range::index(), Sparse< T >::index(), Array< T >::index(), is_permutation(), Array< octave_value * >::lookup(), 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 768 of file idx-vector.h.
Referenced by Array< T >::assign(), and complement().
octave_idx_type idx_vector::freeze | ( | octave_idx_type | z_len, |
const char * | tag, | ||
bool | resize_ok = false |
||
) |
Definition at line 1285 of file idx-vector.cc.
References chkerr(), idx_vector::idx_base_rep::err, extent(), length(), and rep.
|
inline |
Definition at line 556 of file idx-vector.h.
Referenced by complement(), inverse_permutation(), isvector(), maybe_reduce(), unconvert(), and unmask().
octave_idx_type idx_vector::increment | ( | void | ) | const |
Definition at line 1009 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< T >::assign(), Sparse< T >::index(), inverse_permutation(), and octave_lazy_index::issorted().
|
inline |
Definition at line 622 of file idx-vector.h.
Referenced by Array< T >::index(), and Array< octave_value * >::linear_slice().
idx_vector idx_vector::inverse_permutation | ( | octave_idx_type | n | ) | const |
Definition at line 1170 of file idx-vector.cc.
References class_range, class_vector, DIRECT, idx_class(), increment(), length(), n, orig_dimensions(), r, rep, retval, sorted(), and Array< T >::xelem().
Referenced by Sparse< T >::assign(), and Sparse< T >::index().
|
inline |
Definition at line 576 of file idx-vector.h.
Referenced by Sparse< T >::assign(), Array< T >::delete_elements(), Sparse< T >::delete_elements(), octave_perm_matrix::do_index_op(), octave_diag_matrix::do_index_op(), Range::index(), Sparse< T >::index(), Array< T >::index(), ones_count(), and zero_dims_inquire().
|
inline |
Definition at line 585 of file idx-vector.h.
References n.
Referenced by Array< T >::assign(), Sparse< T >::assign(), Sparse< T >::delete_elements(), Sparse< T >::index(), is_permutation(), and maybe_reduce().
|
inline |
Definition at line 1033 of file idx-vector.h.
References n.
bool idx_vector::is_cont_range | ( | octave_idx_type | n, |
octave_idx_type & | l, | ||
octave_idx_type & | u | ||
) | const |
Definition at line 955 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_scalar, idx_vector::idx_base_rep::idx_class(), len, n, r, and rep.
Referenced by Sparse< T >::assign(), Array< T >::delete_elements(), Sparse< T >::delete_elements(), Sparse< T >::index(), Array< T >::index(), and rec_index_helper::is_cont_range().
bool idx_vector::is_permutation | ( | octave_idx_type | n | ) | const |
Definition at line 1141 of file idx-vector.cc.
References extent(), is_colon_equiv(), octave::left, len, length(), n, OCTAVE_LOCAL_BUFFER_INIT, retval, and xelem().
Referenced by Sparse< T >::assign(), octave_perm_matrix::do_index_op(), octave_diag_matrix::do_index_op(), Sparse< T >::index(), and PermMatrix::setup().
|
inline |
Definition at line 582 of file idx-vector.h.
Referenced by Sparse< T >::assign(), Sparse< T >::index(), octave_lazy_index::issorted(), and sub2ind().
|
inline |
Definition at line 579 of file idx-vector.h.
Referenced by octave_base_matrix< MT >::assign(), Array< T >::delete_elements(), octave_perm_matrix::do_index_op(), octave_range::do_index_op(), ind2sub(), Array< T >::index(), Sparse< T >::index(), octave_base_diag< FloatComplexDiagMatrix, FloatComplexMatrix >::resize(), and zero_dims_inquire().
bool idx_vector::isvector | ( | void | ) | const |
Definition at line 1279 of file idx-vector.cc.
References class_vector, idx_class(), dim_vector::isvector(), and orig_dimensions().
Referenced by Sparse< T >::assign(), and Sparse< T >::index().
|
inline |
Definition at line 558 of file idx-vector.h.
References n.
Referenced by Sparse< T >::Sparse(), Array< T >::assign(), Sparse< T >::assign(), MArray< double >::changesign(), complement(), Array< T >::delete_elements(), Sparse< T >::delete_elements(), octave::dims_to_numel(), do_accumarray_minmax(), do_accumarray_sum(), do_accumdim_sum(), freeze(), Array< octave_value * >::hermitian(), MArray< T >::idx_add(), MArray< T >::idx_add_nd(), increment(), ind2sub(), Range::index(), Array< T >::index(), Sparse< T >::index(), inverse_permutation(), is_permutation(), Array< octave_value * >::linear_slice(), make_java_index(), ones_count(), PermMatrix::setup(), sub2ind(), and octave_lazy_index::try_narrowing_conversion().
|
inline |
Definition at line 838 of file idx-vector.h.
Referenced by MArray< double >::changesign(), MArray< T >::idx_add(), MArray< T >::idx_add_nd(), and Range::index().
|
inlinestatic |
Definition at line 483 of file idx-vector.h.
References len.
Referenced by convolve(), octave::opengl_renderer::get_pixels(), and sub2ind().
|
inline |
Definition at line 1044 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 786 of file idx-vector.cc.
References idx_vector(), 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(), is_colon_equiv(), idx_vector::idx_base_rep::is_colon_equiv(), idx_vector::idx_base_rep::length(), idx_vector::idx_range_rep::length(), n, r, and rep.
Referenced by Array< T >::assign(), and Array< T >::index().
|
staticprivate |
Definition at line 60 of file idx-vector.cc.
octave_idx_type idx_vector::ones_count | ( | void | ) | const |
Definition at line 1300 of file idx-vector.cc.
References is_colon(), length(), n, and xelem().
|
inline |
Definition at line 573 of file idx-vector.h.
|
inline |
Definition at line 570 of file idx-vector.h.
References n.
|
inline |
Definition at line 543 of file idx-vector.h.
References idx_vector::idx_base_rep::count, and rep.
|
inline |
Definition at line 599 of file idx-vector.h.
|
inline |
Definition at line 594 of file idx-vector.h.
Referenced by Sparse< T >::delete_elements(), ind2sub(), Range::index(), Sparse< T >::index(), inverse_permutation(), isvector(), octave_lazy_index::sort(), and octave_lazy_index::try_narrowing_conversion().
|
inline |
Definition at line 602 of file idx-vector.h.
|
inline |
Definition at line 596 of file idx-vector.h.
|
inline |
Definition at line 607 of file idx-vector.h.
const octave_idx_type * idx_vector::raw | ( | void | ) |
Definition at line 1039 of file idx-vector.cc.
References idx_vector(), as_array(), class_vector, extent(), idx_vector::idx_base_rep::idx_class(), r, and rep.
Referenced by Sparse< T >::Sparse(), Sparse< T >::delete_elements(), and Sparse< T >::index().
|
inline |
Definition at line 1039 of file idx-vector.h.
|
inline |
Definition at line 591 of file idx-vector.h.
|
inline |
Definition at line 588 of file idx-vector.h.
Referenced by Sparse< T >::assign(), Sparse< T >::delete_elements(), inverse_permutation(), and octave_lazy_index::sort().
void idx_vector::unconvert | ( | idx_class_type & | iclass, |
double & | scalar, | ||
Range & | range, | ||
Array< double > & | array, | ||
Array< bool > & | mask | ||
) | const |
Definition at line 1228 of file idx-vector.cc.
References class_colon, class_mask, class_range, class_scalar, class_vector, idx_class(), r, rep, and scalar().
idx_vector idx_vector::unmask | ( | void | ) | const |
Definition at line 1205 of file idx-vector.cc.
References class_mask, DIRECT, idx_class(), len, r, and rep.
Referenced by Ffind().
|
inline |
Definition at line 564 of file idx-vector.h.
References n.
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 609 of file idx-vector.h.
|
friend |
Definition at line 69 of file idx-vector.h.
|
static |
Definition at line 499 of file idx-vector.h.
Referenced by Sparse< T >::assign(), Array< T >::cat(), Sparse< T >::cat(), ComplexMatrix::column(), Matrix::column(), FloatComplexMatrix::column(), FloatMatrix::column(), octave_map::column(), Sparse< T >::delete_elements(), Array< T >::delete_elements(), do_cellslices_nda(), do_fft(), do_mat2cell_nd(), F__ilutp__(), Fcell2struct(), octave::opengl_renderer::get_pixels(), ilu_tp(), Sparse< T >::index(), octave_map::page(), prepare_idx(), ComplexMatrix::row(), Matrix::row(), FloatComplexMatrix::row(), and FloatMatrix::row().
|
private |
Definition at line 1048 of file idx-vector.h.
Referenced by idx_vector(), as_array(), complement(), copy_data(), freeze(), increment(), inverse_permutation(), is_cont_range(), maybe_reduce(), operator=(), raw(), unconvert(), and unmask().