GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
MSparse< T > Class Template Reference

#include "MSparse.h"

Inheritance diagram for MSparse< T >:
Collaboration diagram for MSparse< T >:

Public Types

typedef T element_type
 

Public Member Functions

 MSparse (const Array< T > &a, const idx_vector &r, const idx_vector &c, octave_idx_type nr=-1, octave_idx_type nc=-1, bool sum_terms=true, octave_idx_type nzm=-1)
 
 MSparse (const dim_vector &dv, octave_idx_type nz=0)
 
 MSparse (const MSparse< T > &a)
 
 MSparse (const MSparse< T > &a, const dim_vector &dv)
 
 MSparse (const PermMatrix &a)
 
 MSparse (const Sparse< T > &a)
 
template<typename U >
 MSparse (const Sparse< U > &a)
 
 MSparse (octave_idx_type n, octave_idx_type m)
 
 MSparse (octave_idx_type r, octave_idx_type c, octave_idx_type num_nz)
 
 MSparse (octave_idx_type r, octave_idx_type c, T val)
 
 MSparse (void)
 
 ~MSparse (void)=default
 
bool any_element_is_nan (void) const
 
Array< T > array_value (void) const
 
void assign (const idx_vector &i, const idx_vector &j, const Sparse< T > &rhs)
 
void assign (const idx_vector &i, const Sparse< T > &rhs)
 
size_t byte_size (void) const
 
void change_capacity (octave_idx_type nz)
 
T & checkelem (const Array< octave_idx_type > &ra_idx)
 
checkelem (const Array< octave_idx_type > &ra_idx) const
 
T & checkelem (octave_idx_type i, octave_idx_type j)
 
checkelem (octave_idx_type i, octave_idx_type j) const
 
T & checkelem (octave_idx_type n)
 
checkelem (octave_idx_type n) const
 
octave_idx_typecidx (octave_idx_type i)
 
octave_idx_type cidx (octave_idx_type i) const
 
octave_idx_typecidx (void)
 
octave_idx_typecidx (void) const
 
octave_idx_type cols (void) const
 
octave_idx_type columns (void) const
 
octave_idx_type compute_index (const Array< octave_idx_type > &ra_idx) const
 
T & data (octave_idx_type i)
 
data (octave_idx_type i) const
 
T * data (void)
 
T * data (void) const
 
void delete_elements (const idx_vector &i)
 
void delete_elements (const idx_vector &i, const idx_vector &j)
 
void delete_elements (int dim, const idx_vector &i)
 
MSparse< T > diag (octave_idx_type k=0) const
 
octave_idx_type dim1 (void) const
 
octave_idx_type dim2 (void) const
 
dim_vector dims (void) const
 
T & elem (const Array< octave_idx_type > &ra_idx)
 
elem (const Array< octave_idx_type > &ra_idx) const
 
T & elem (octave_idx_type i, octave_idx_type j)
 
elem (octave_idx_type i, octave_idx_type j) const
 
T & elem (octave_idx_type n)
 
elem (octave_idx_type n) const
 
octave_idx_type get_col_index (octave_idx_type k)
 
octave_idx_type get_row_index (octave_idx_type k)
 
Sparse< T > index (const idx_vector &i, bool resize_ok=false) const
 
Sparse< T > index (const idx_vector &i, const idx_vector &j, bool resize_ok=false) const
 
bool indices_ok (void) const
 
MSparse< T > & insert (const Sparse< T > &a, const Array< octave_idx_type > &indx)
 
MSparse< T > & insert (const Sparse< T > &a, octave_idx_type r, octave_idx_type c)
 
MSparse< T > ipermute (const Array< octave_idx_type > &vec) const
 
bool isempty (void) const
 
bool issquare (void) const
 
template<typename U , typename F >
Sparse< U > map (F fcn) const
 
template<typename U >
MSparse< U > map (U(&fcn)(const T &)) const
 
template<typename U >
MSparse< U > map (U(&fcn)(T)) const
 
Sparse< T > maybe_compress (bool remove_zeros=false)
 
void * mex_get_data (void) const
 
octave_idx_typemex_get_ir (void) const
 
octave_idx_typemex_get_jc (void) const
 
octave_idx_type ndims (void) const
 
octave_idx_type nnz (void) const
 Actual number of nonzero terms. More...
 
octave_idx_type numel (void) const
 
octave_idx_type nzmax (void) const
 Amount of storage for nonzero elements. More...
 
T & operator() (const Array< octave_idx_type > &ra_idx)
 
operator() (const Array< octave_idx_type > &ra_idx) const
 
T & operator() (octave_idx_type i, octave_idx_type j)
 
operator() (octave_idx_type i, octave_idx_type j) const
 
T & operator() (octave_idx_type n)
 
operator() (octave_idx_type n) const
 
MSparse< T > & operator= (const MSparse< T > &a)
 
MSparse< T > permute (const Array< octave_idx_type > &vec, bool inv=false) const
 
void print_info (std::ostream &os, const std::string &prefix) const
 
OCTAVE_NORETURN T & range_error (const char *fcn, const Array< octave_idx_type > &ra_idx)
 
OCTAVE_NORETURN T range_error (const char *fcn, const Array< octave_idx_type > &ra_idx) const
 
OCTAVE_NORETURN T & range_error (const char *fcn, octave_idx_type i, octave_idx_type j)
 
OCTAVE_NORETURN T range_error (const char *fcn, octave_idx_type i, octave_idx_type j) const
 
OCTAVE_NORETURN T & range_error (const char *fcn, octave_idx_type n)
 
OCTAVE_NORETURN T range_error (const char *fcn, octave_idx_type n) const
 
MSparse< T > reshape (const dim_vector &new_dims) const
 
void resize (const dim_vector &dv)
 
void resize (octave_idx_type r, octave_idx_type c)
 
void resize1 (octave_idx_type n)
 
octave_idx_typeridx (octave_idx_type i)
 
octave_idx_type ridx (octave_idx_type i) const
 
octave_idx_typeridx (void)
 
octave_idx_typeridx (void) const
 
octave_idx_type rows (void) const
 
Sparse< T > sort (Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
 
Sparse< T > sort (octave_idx_type dim=0, sortmode mode=ASCENDING) const
 
MSparse< T > squeeze (void) const
 
template<typename F , bool zero>
bool test (F fcn) const
 
bool test_all (bool(&fcn)(const T &)) const
 
bool test_all (bool(&fcn)(T)) const
 
template<typename F >
bool test_all (F fcn) const
 
bool test_any (bool(&fcn)(const T &)) const
 
bool test_any (bool(&fcn)(T)) const
 
template<typename F >
bool test_any (F fcn) const
 
MSparse< T > transpose (void) const
 
octave_idx_typexcidx (octave_idx_type i)
 
octave_idx_typexcidx (void)
 
T & xdata (octave_idx_type i)
 
T * xdata (void)
 
T & xelem (const Array< octave_idx_type > &ra_idx)
 
xelem (const Array< octave_idx_type > &ra_idx) const
 
T & xelem (octave_idx_type i, octave_idx_type j)
 
xelem (octave_idx_type i, octave_idx_type j) const
 
T & xelem (octave_idx_type n)
 
xelem (octave_idx_type n) const
 
octave_idx_typexridx (octave_idx_type i)
 
octave_idx_typexridx (void)
 

Static Public Member Functions

static Sparse< T > cat (int dim, octave_idx_type n, const Sparse< T > *sparse_list)
 

Public Attributes

dim_vector dimensions
 
Sparse< T >::SparseReprep
 

Protected Member Functions

void make_unique (void)
 

Static Private Member Functions

static Sparse< T >::SparseRepnil_rep (void)
 

Detailed Description

template<typename T>
class MSparse< T >

Definition at line 40 of file MSparse.h.

Member Typedef Documentation

◆ element_type

template<typename T >
typedef T Sparse< T >::element_type
inherited

Definition at line 52 of file Sparse.h.

Constructor & Destructor Documentation

◆ MSparse() [1/11]

template<typename T >
MSparse< T >::MSparse ( void  )
inline

Definition at line 45 of file MSparse.h.

◆ MSparse() [2/11]

template<typename T >
MSparse< T >::MSparse ( octave_idx_type  n,
octave_idx_type  m 
)
inline

Definition at line 47 of file MSparse.h.

◆ MSparse() [3/11]

template<typename T >
MSparse< T >::MSparse ( const dim_vector dv,
octave_idx_type  nz = 0 
)
inline

Definition at line 49 of file MSparse.h.

◆ MSparse() [4/11]

template<typename T >
MSparse< T >::MSparse ( const MSparse< T > &  a)
inline

Definition at line 52 of file MSparse.h.

◆ MSparse() [5/11]

template<typename T >
MSparse< T >::MSparse ( const MSparse< T > &  a,
const dim_vector dv 
)
inline

Definition at line 54 of file MSparse.h.

◆ MSparse() [6/11]

template<typename T >
MSparse< T >::MSparse ( const Sparse< T > &  a)
inline

Definition at line 56 of file MSparse.h.

◆ MSparse() [7/11]

template<typename T >
template<typename U >
MSparse< T >::MSparse ( const Sparse< U > &  a)
inline

Definition at line 59 of file MSparse.h.

◆ MSparse() [8/11]

template<typename T >
MSparse< T >::MSparse ( const Array< T > &  a,
const idx_vector r,
const idx_vector c,
octave_idx_type  nr = -1,
octave_idx_type  nc = -1,
bool  sum_terms = true,
octave_idx_type  nzm = -1 
)
inline

Definition at line 61 of file MSparse.h.

◆ MSparse() [9/11]

template<typename T >
MSparse< T >::MSparse ( octave_idx_type  r,
octave_idx_type  c,
val 
)
inlineexplicit

Definition at line 66 of file MSparse.h.

◆ MSparse() [10/11]

template<typename T >
MSparse< T >::MSparse ( const PermMatrix a)
inlineexplicit

Definition at line 69 of file MSparse.h.

◆ MSparse() [11/11]

template<typename T >
MSparse< T >::MSparse ( octave_idx_type  r,
octave_idx_type  c,
octave_idx_type  num_nz 
)
inline

Definition at line 71 of file MSparse.h.

◆ ~MSparse()

template<typename T >
MSparse< T >::~MSparse ( void  )
default

Member Function Documentation

◆ any_element_is_nan()

template<typename T >
bool Sparse< T >::any_element_is_nan ( void  ) const
inlineinherited

Definition at line 647 of file Sparse.h.

References Sparse< T >::SparseRep::any_element_is_nan().

◆ array_value()

template<typename T >
Array< T > Sparse< T >::array_value ( void  ) const
inherited

◆ assign() [1/2]

◆ assign() [2/2]

◆ byte_size()

◆ cat()

◆ change_capacity()

template<typename T >
void Sparse< T >::change_capacity ( octave_idx_type  nz)
inlineinherited

Definition at line 454 of file Sparse.h.

References Sparse< T >::SparseRep::change_length().

Referenced by Sparse< T >::Sparse().

◆ checkelem() [1/6]

template<typename T >
T& Sparse< T >::checkelem ( const Array< octave_idx_type > &  ra_idx)
inlineinherited

Definition at line 345 of file Sparse.h.

References compute_index(), elem, and ra_idx.

◆ checkelem() [2/6]

template<typename T >
T Sparse< T >::checkelem ( const Array< octave_idx_type > &  ra_idx) const
inlineinherited

Definition at line 401 of file Sparse.h.

References compute_index(), Sparse< T >::elem(), and ra_idx.

◆ checkelem() [3/6]

template<typename T >
T& Sparse< T >::checkelem ( octave_idx_type  i,
octave_idx_type  j 
)
inlineinherited

Definition at line 334 of file Sparse.h.

◆ checkelem() [4/6]

template<typename T >
T Sparse< T >::checkelem ( octave_idx_type  i,
octave_idx_type  j 
) const
inlineinherited

Definition at line 393 of file Sparse.h.

◆ checkelem() [5/6]

template<typename T >
T& Sparse< T >::checkelem ( octave_idx_type  n)
inlineinherited

Definition at line 322 of file Sparse.h.

References n, and numel().

◆ checkelem() [6/6]

template<typename T >
T Sparse< T >::checkelem ( octave_idx_type  n) const
inlineinherited

Definition at line 385 of file Sparse.h.

References n, and numel().

◆ cidx() [1/4]

template<typename T >
octave_idx_type& Sparse< T >::cidx ( octave_idx_type  i)
inlineinherited

Definition at line 493 of file Sparse.h.

References Sparse< T >::SparseRep::cidx().

◆ cidx() [2/4]

template<typename T >
octave_idx_type Sparse< T >::cidx ( octave_idx_type  i) const
inlineinherited

Definition at line 501 of file Sparse.h.

References Sparse< T >::SparseRep::ccidx().

◆ cidx() [3/4]

template<typename T >
octave_idx_type* Sparse< T >::cidx ( void  )
inlineinherited

Definition at line 492 of file Sparse.h.

References Sparse< T >::SparseRep::c.

Referenced by idx_vector::idx_vector_rep::idx_vector_rep(), MatrixType::MatrixType(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::sparse_qr_rep(), SparseComplexMatrix::SparseComplexMatrix(), SparseMatrix::SparseMatrix(), SparseComplexMatrix::abs(), octave_sparse_bool_matrix::as_mxArray(), octave_sparse_complex_matrix::as_mxArray(), octave_sparse_matrix::as_mxArray(), Sparse< T >::assign(), binmap(), SparseComplexMatrix::bsolve(), SparseMatrix::bsolve(), Sparse< T >::cat(), octave_sparse_complex_matrix::char_array_value(), octave_sparse_bool_matrix::char_array_value(), octave_sparse_matrix::char_array_value(), SparseComplexMatrix::column(), SparseMatrix::column(), octave_sparse_matrix::convert_to_str_internal(), Sparse< T >::delete_elements(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), dmsolve_insert(), dmsolve_permute(), SparseComplexMatrix::dsolve(), SparseMatrix::dsolve(), elem_xpow(), SparseComplexMatrix::factorize(), SparseMatrix::factorize(), Fcomplex(), find_nonzero_elem_idx(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), Fsymbfact(), SparseComplexMatrix::hermitian(), Sparse< T >::insert(), SparseComplexMatrix::inverse(), SparseMatrix::inverse(), SparseComplexMatrix::ishermitian(), SparseMatrix::issymmetric(), SparseComplexMatrix::ltsolve(), SparseMatrix::ltsolve(), Sparse< T >::map(), SparseComplexMatrix::max(), SparseMatrix::max(), max(), SparseComplexMatrix::min(), SparseMatrix::min(), min(), SparseComplexMatrix::operator!(), SparseMatrix::operator!(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), octave::math::sparse_lu< lu_type >::Pc(), plus_or_minus(), octave::math::sparse_lu< lu_type >::Pr(), SparseComplexMatrix::prod(), SparseMatrix::prod(), product(), quotient(), read_mat5_binary_element(), read_sparse_matrix(), SparseComplexMatrix::row(), SparseMatrix::row(), octave_sparse_bool_matrix::save_binary(), octave_sparse_complex_matrix::save_binary(), octave_sparse_matrix::save_binary(), times_or_divide(), times_or_divides(), SparseComplexMatrix::tinverse(), SparseMatrix::tinverse(), SparseComplexMatrix::trisolve(), SparseMatrix::trisolve(), SparseComplexMatrix::utsolve(), SparseMatrix::utsolve(), x_el_div(), and xpow().

◆ cidx() [4/4]

template<typename T >
octave_idx_type* Sparse< T >::cidx ( void  ) const
inlineinherited

Definition at line 503 of file Sparse.h.

References Sparse< T >::SparseRep::c.

◆ cols()

template<typename T >
octave_idx_type Sparse< T >::cols ( void  ) const
inlineinherited

Definition at line 251 of file Sparse.h.

Referenced by idx_vector::idx_vector_rep::idx_vector_rep(), MatrixType::MatrixType(), Sparse< T >::Sparse(), SparseComplexMatrix::SparseComplexMatrix(), SparseMatrix::SparseMatrix(), SparseComplexMatrix::abs(), Sparse< T >::assign(), binmap(), SparseComplexMatrix::bsolve(), SparseMatrix::bsolve(), octave_sparse_complex_matrix::char_array_value(), octave_sparse_bool_matrix::char_array_value(), octave_sparse_matrix::char_array_value(), SparseBoolMatrix::concat(), SparseComplexMatrix::concat(), SparseMatrix::concat(), octave_sparse_matrix::convert_to_str_internal(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), SparseComplexMatrix::dinverse(), SparseMatrix::dinverse(), dmsolve_insert(), dmsolve_permute(), SparseComplexMatrix::dsolve(), SparseMatrix::dsolve(), elem_xpow(), F__ilu0__(), F__iluc__(), F__ilutp__(), SparseComplexMatrix::factorize(), SparseMatrix::factorize(), Famd(), Fccolamd(), Fcolamd(), Fcomplex(), Fcsymamd(), Fetree(), find_nonzero_elem_idx(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), Fsymamd(), Fsymbfact(), SparseComplexMatrix::hermitian(), Sparse< T >::insert(), SparseComplexMatrix::inverse(), SparseMatrix::inverse(), SparseComplexMatrix::ishermitian(), SparseMatrix::issymmetric(), SparseComplexMatrix::ltsolve(), SparseMatrix::ltsolve(), octave_sparse_matrix::map(), max(), min(), SparseComplexMatrix::operator!(), SparseMatrix::operator!(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), plus_or_minus(), product(), quotient(), read_sparse_matrix(), save_mat5_binary_element(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::tall_solve(), times_or_divide(), times_or_divides(), SparseComplexMatrix::tinverse(), SparseMatrix::tinverse(), SparseComplexMatrix::trisolve(), SparseMatrix::trisolve(), octave_sparse_bool_matrix::try_narrowing_conversion(), octave_sparse_complex_matrix::try_narrowing_conversion(), octave_sparse_matrix::try_narrowing_conversion(), SparseComplexMatrix::utsolve(), SparseMatrix::utsolve(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::wide_solve(), x_el_div(), and xpow().

◆ columns()

template<typename T >
octave_idx_type Sparse< T >::columns ( void  ) const
inlineinherited

◆ compute_index()

template<typename T >
octave_idx_type Sparse< T >::compute_index ( const Array< octave_idx_type > &  ra_idx) const
inherited

Definition at line 720 of file Sparse.cc.

References n, octave_base_value::numel(), ra_idx, and retval.

◆ data() [1/4]

template<typename T >
T& Sparse< T >::data ( octave_idx_type  i)
inlineinherited

Definition at line 471 of file Sparse.h.

References Sparse< T >::SparseRep::data().

◆ data() [2/4]

template<typename T >
T Sparse< T >::data ( octave_idx_type  i) const
inlineinherited

Definition at line 475 of file Sparse.h.

References Sparse< T >::SparseRep::data().

◆ data() [3/4]

template<typename T >
T* Sparse< T >::data ( void  )
inlineinherited

Definition at line 470 of file Sparse.h.

References Sparse< T >::SparseRep::d.

Referenced by idx_vector::idx_vector_rep::idx_vector_rep(), MatrixType::MatrixType(), Sparse< T >::Sparse(), octave::math::sparse_lu< lu_type >::sparse_lu(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::sparse_qr_rep(), SparseComplexMatrix::SparseComplexMatrix(), SparseMatrix::SparseMatrix(), SparseComplexMatrix::abs(), SparseMatrix::all_elements_are_int_or_inf_or_nan(), SparseComplexMatrix::all_elements_are_real(), SparseMatrix::all_elements_are_zero(), SparseComplexMatrix::all_integers(), SparseMatrix::all_integers(), SparseComplexMatrix::any_element_is_inf_or_nan(), SparseMatrix::any_element_is_inf_or_nan(), SparseComplexMatrix::any_element_is_nan(), SparseMatrix::any_element_is_nan(), SparseMatrix::any_element_is_negative(), SparseMatrix::any_element_not_one_or_zero(), octave_sparse_bool_matrix::as_mxArray(), octave_sparse_complex_matrix::as_mxArray(), octave_sparse_matrix::as_mxArray(), Sparse< T >::assign(), binmap(), SparseComplexMatrix::bsolve(), SparseMatrix::bsolve(), Sparse< T >::cat(), octave_sparse_complex_matrix::char_array_value(), octave_sparse_bool_matrix::char_array_value(), octave_sparse_matrix::char_array_value(), SparseComplexMatrix::column(), SparseMatrix::column(), octave_sparse_matrix::convert_to_str_internal(), Sparse< T >::delete_elements(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), dmsolve_insert(), dmsolve_permute(), SparseComplexMatrix::dsolve(), SparseMatrix::dsolve(), elem_xpow(), SparseComplexMatrix::factorize(), SparseMatrix::factorize(), Fcomplex(), find_nonzero_elem_idx(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), Fsymbfact(), SparseComplexMatrix::hermitian(), Sparse< T >::insert(), SparseComplexMatrix::ishermitian(), SparseMatrix::issymmetric(), SparseComplexMatrix::ltsolve(), SparseMatrix::ltsolve(), Sparse< T >::map(), SparseComplexMatrix::max(), SparseMatrix::max(), max(), SparseComplexMatrix::min(), SparseMatrix::min(), min(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), octave::math::sparse_lu< lu_type >::Pc(), plus_or_minus(), octave::math::sparse_lu< lu_type >::Pr(), product(), quotient(), read_mat5_binary_element(), read_sparse_matrix(), SparseComplexMatrix::row(), SparseMatrix::row(), octave_sparse_bool_matrix::save_binary(), octave_sparse_complex_matrix::save_binary(), octave_sparse_matrix::save_binary(), times_or_divide(), times_or_divides(), SparseComplexMatrix::tinverse(), SparseMatrix::tinverse(), SparseComplexMatrix::trisolve(), SparseMatrix::trisolve(), SparseComplexMatrix::utsolve(), SparseMatrix::utsolve(), x_el_div(), and xpow().

◆ data() [4/4]

template<typename T >
T* Sparse< T >::data ( void  ) const
inlineinherited

Definition at line 477 of file Sparse.h.

References Sparse< T >::SparseRep::d.

◆ delete_elements() [1/3]

◆ delete_elements() [2/3]

◆ delete_elements() [3/3]

template<typename T >
void Sparse< T >::delete_elements ( int  dim,
const idx_vector i 
)
inherited

Definition at line 1381 of file Sparse.cc.

References idx_vector::colon, and current_liboctave_error_handler.

◆ diag()

template<typename T >
MSparse<T> MSparse< T >::diag ( octave_idx_type  k = 0) const
inline

Definition at line 107 of file MSparse.h.

References Sparse< T >::diag().

Referenced by SparseComplexMatrix::diag(), and SparseMatrix::diag().

◆ dim1()

template<typename T >
octave_idx_type Sparse< T >::dim1 ( void  ) const
inlineinherited

Definition at line 247 of file Sparse.h.

◆ dim2()

template<typename T >
octave_idx_type Sparse< T >::dim2 ( void  ) const
inlineinherited

Definition at line 248 of file Sparse.h.

◆ dims()

◆ elem() [1/6]

template<typename T >
T& Sparse< T >::elem ( const Array< octave_idx_type > &  ra_idx)
inlineinherited

Definition at line 367 of file Sparse.h.

References compute_index(), Sparse< T >::elem(), and ra_idx.

◆ elem() [2/6]

template<typename T >
T Sparse< T >::elem ( const Array< octave_idx_type > &  ra_idx) const
inlineinherited

Definition at line 415 of file Sparse.h.

References compute_index(), Sparse< T >::elem(), and ra_idx.

◆ elem() [3/6]

template<typename T >
T& Sparse< T >::elem ( octave_idx_type  i,
octave_idx_type  j 
)
inlineinherited

Definition at line 361 of file Sparse.h.

◆ elem() [4/6]

template<typename T >
T Sparse< T >::elem ( octave_idx_type  i,
octave_idx_type  j 
) const
inlineinherited

Definition at line 413 of file Sparse.h.

◆ elem() [5/6]

◆ elem() [6/6]

template<typename T >
T Sparse< T >::elem ( octave_idx_type  n) const
inlineinherited

Definition at line 411 of file Sparse.h.

References n.

◆ get_col_index()

template<typename T >
octave_idx_type Sparse< T >::get_col_index ( octave_idx_type  k)
inlineinherited

Definition at line 255 of file Sparse.h.

◆ get_row_index()

template<typename T >
octave_idx_type Sparse< T >::get_row_index ( octave_idx_type  k)
inlineinherited

Definition at line 254 of file Sparse.h.

◆ index() [1/2]

◆ index() [2/2]

◆ indices_ok()

template<typename T >
bool Sparse< T >::indices_ok ( void  ) const
inlineinherited

Definition at line 645 of file Sparse.h.

References Sparse< T >::SparseRep::indices_ok().

◆ insert() [1/2]

template<typename T >
MSparse<T>& MSparse< T >::insert ( const Sparse< T > &  a,
const Array< octave_idx_type > &  indx 
)
inline

Definition at line 88 of file MSparse.h.

References Sparse< T >::insert().

◆ insert() [2/2]

template<typename T >
MSparse<T>& MSparse< T >::insert ( const Sparse< T > &  a,
octave_idx_type  r,
octave_idx_type  c 
)
inline

Definition at line 82 of file MSparse.h.

References Sparse< T >::insert(), and r.

Referenced by SparseComplexMatrix::insert(), and SparseMatrix::insert().

◆ ipermute()

template<typename T >
MSparse<T> MSparse< T >::ipermute ( const Array< octave_idx_type > &  vec) const
inline

Definition at line 104 of file MSparse.h.

References Sparse< T >::ipermute().

Referenced by SparseComplexMatrix::ipermute(), and SparseMatrix::ipermute().

◆ isempty()

template<typename T >
bool Sparse< T >::isempty ( void  ) const
inlineinherited

Definition at line 466 of file Sparse.h.

Referenced by Sparse< T >::cat(), and LuAminusSigmaB().

◆ issquare()

template<typename T >
bool Sparse< T >::issquare ( void  ) const
inlineinherited

Definition at line 464 of file Sparse.h.

◆ make_unique()

template<typename T >
void Sparse< T >::make_unique ( void  )
inlineprotectedinherited

Definition at line 140 of file Sparse.h.

References r.

◆ map() [1/3]

template<typename T >
template<typename U , typename F >
Sparse<U> Sparse< T >::map ( fcn) const
inlineinherited

◆ map() [2/3]

template<typename T >
template<typename U >
MSparse<U> MSparse< T >::map ( U(&)(const T &)  fcn) const
inline

Definition at line 120 of file MSparse.h.

◆ map() [3/3]

template<typename T >
template<typename U >
MSparse<U> MSparse< T >::map ( U(&)(T)  fcn) const
inline

Definition at line 115 of file MSparse.h.

◆ maybe_compress()

◆ mex_get_data()

template<typename T >
void* Sparse< T >::mex_get_data ( void  ) const
inlineinherited

Definition at line 526 of file Sparse.h.

Referenced by octave_base_sparse< T >::mex_get_data().

◆ mex_get_ir()

template<typename T >
octave_idx_type* Sparse< T >::mex_get_ir ( void  ) const
inlineinherited

Definition at line 528 of file Sparse.h.

Referenced by octave_base_sparse< T >::mex_get_ir().

◆ mex_get_jc()

template<typename T >
octave_idx_type* Sparse< T >::mex_get_jc ( void  ) const
inlineinherited

Definition at line 533 of file Sparse.h.

Referenced by octave_base_sparse< T >::mex_get_jc().

◆ ndims()

template<typename T >
octave_idx_type Sparse< T >::ndims ( void  ) const
inlineinherited

Definition at line 505 of file Sparse.h.

References dim_vector::ndims().

Referenced by octave_base_sparse< T >::octave_base_sparse().

◆ nil_rep()

template<typename T >
Sparse< T >::SparseRep * Sparse< T >::nil_rep ( void  )
staticprivateinherited

Definition at line 58 of file Sparse.cc.

◆ nnz()

template<typename T >
octave_idx_type Sparse< T >::nnz ( void  ) const
inlineinherited

Actual number of nonzero terms.

Definition at line 238 of file Sparse.h.

References Sparse< T >::SparseRep::nnz().

Referenced by MatrixType::MatrixType(), Sparse< T >::Sparse(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::sparse_qr_rep(), SparseComplexMatrix::SparseComplexMatrix(), SparseMatrix::SparseMatrix(), SparseComplexMatrix::abs(), SparseMatrix::abs(), SparseMatrix::all_elements_are_int_or_inf_or_nan(), SparseComplexMatrix::all_elements_are_real(), SparseMatrix::all_elements_are_zero(), SparseComplexMatrix::all_integers(), SparseMatrix::all_integers(), SparseComplexMatrix::any_element_is_inf_or_nan(), SparseMatrix::any_element_is_inf_or_nan(), SparseComplexMatrix::any_element_is_nan(), SparseMatrix::any_element_is_nan(), Sparse< T >::SparseRep::any_element_is_nan(), SparseMatrix::any_element_is_negative(), SparseMatrix::any_element_not_one_or_zero(), Sparse< T >::assign(), binmap(), SparseComplexMatrix::bsolve(), SparseMatrix::bsolve(), Sparse< T >::cat(), Sparse< T >::delete_elements(), dmperm_internal(), dmsolve_insert(), dmsolve_permute(), SparseComplexMatrix::dsolve(), SparseMatrix::dsolve(), elem_xpow(), Fccolamd(), Fcolamd(), Fcomplex(), find_nonzero_elem_idx(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), Fsymbfact(), SparseComplexMatrix::hermitian(), octave_sparse_matrix::index_vector(), Sparse< T >::SparseRep::indices_ok(), Sparse< T >::insert(), SparseComplexMatrix::inverse(), SparseMatrix::inverse(), SparseComplexMatrix::ltsolve(), SparseMatrix::ltsolve(), max(), min(), octave_base_sparse< T >::nnz(), SparseComplexMatrix::operator!(), SparseMatrix::operator!(), operator-(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), plus_or_minus(), product(), quotient(), octave_sparse_complex_matrix::save_binary(), octave_sparse_matrix::save_binary(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::tall_solve(), times_or_divide(), times_or_divides(), SparseComplexMatrix::tinverse(), SparseMatrix::tinverse(), SparseComplexMatrix::trisolve(), SparseMatrix::trisolve(), SparseComplexMatrix::utsolve(), SparseMatrix::utsolve(), and octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::wide_solve().

◆ numel()

template<typename T >
octave_idx_type Sparse< T >::numel ( void  ) const
inlineinherited

◆ nzmax()

template<typename T >
octave_idx_type Sparse< T >::nzmax ( void  ) const
inlineinherited

Amount of storage for nonzero elements.

This may differ from the actual number of elements, see nnz().

Definition at line 235 of file Sparse.h.

References Sparse< T >::SparseRep::length().

Referenced by dmperm_internal(), octave_base_sparse< T >::nzmax(), read_sparse_matrix(), and save_mat5_binary_element().

◆ operator()() [1/6]

template<typename T >
T& Sparse< T >::operator() ( const Array< octave_idx_type > &  ra_idx)
inlineinherited

Definition at line 380 of file Sparse.h.

References elem, and ra_idx.

◆ operator()() [2/6]

template<typename T >
T Sparse< T >::operator() ( const Array< octave_idx_type > &  ra_idx) const
inlineinherited

Definition at line 425 of file Sparse.h.

References elem, and ra_idx.

◆ operator()() [3/6]

template<typename T >
T& Sparse< T >::operator() ( octave_idx_type  i,
octave_idx_type  j 
)
inlineinherited

Definition at line 375 of file Sparse.h.

References elem.

◆ operator()() [4/6]

template<typename T >
T Sparse< T >::operator() ( octave_idx_type  i,
octave_idx_type  j 
) const
inlineinherited

Definition at line 420 of file Sparse.h.

References elem.

◆ operator()() [5/6]

template<typename T >
T& Sparse< T >::operator() ( octave_idx_type  n)
inlineinherited

Definition at line 370 of file Sparse.h.

References elem, and n.

◆ operator()() [6/6]

template<typename T >
T Sparse< T >::operator() ( octave_idx_type  n) const
inlineinherited

Definition at line 418 of file Sparse.h.

References elem, and n.

◆ operator=()

template<typename T >
MSparse<T>& MSparse< T >::operator= ( const MSparse< T > &  a)
inline

Definition at line 76 of file MSparse.h.

References Sparse< T >::operator=().

Referenced by SparseComplexMatrix::operator=(), and SparseMatrix::operator=().

◆ permute()

template<typename T >
MSparse<T> MSparse< T >::permute ( const Array< octave_idx_type > &  vec,
bool  inv = false 
) const
inline

Definition at line 101 of file MSparse.h.

References Sparse< T >::permute().

Referenced by SparseComplexMatrix::permute(), and SparseMatrix::permute().

◆ print_info()

template<typename T >
void Sparse< T >::print_info ( std::ostream &  os,
const std::string &  prefix 
) const
inherited

Definition at line 3014 of file Sparse.cc.

◆ range_error() [1/6]

template<typename T >
T & Sparse< T >::range_error ( const char *  fcn,
const Array< octave_idx_type > &  ra_idx 
)
inherited

Definition at line 802 of file Sparse.cc.

References n, octave_base_value::numel(), and ra_idx.

◆ range_error() [2/6]

template<typename T >
T Sparse< T >::range_error ( const char *  fcn,
const Array< octave_idx_type > &  ra_idx 
) const
inherited

Definition at line 778 of file Sparse.cc.

References n, octave_base_value::numel(), and ra_idx.

◆ range_error() [3/6]

template<typename T >
T & Sparse< T >::range_error ( const char *  fcn,
octave_idx_type  i,
octave_idx_type  j 
)
inherited

Definition at line 769 of file Sparse.cc.

◆ range_error() [4/6]

template<typename T >
T Sparse< T >::range_error ( const char *  fcn,
octave_idx_type  i,
octave_idx_type  j 
) const
inherited

Definition at line 759 of file Sparse.cc.

◆ range_error() [5/6]

template<typename T >
T & Sparse< T >::range_error ( const char *  fcn,
octave_idx_type  n 
)
inherited

Definition at line 751 of file Sparse.cc.

References n.

◆ range_error() [6/6]

template<typename T >
T Sparse< T >::range_error ( const char *  fcn,
octave_idx_type  n 
) const
inherited

Definition at line 743 of file Sparse.cc.

References n.

◆ reshape()

template<typename T >
MSparse<T> MSparse< T >::reshape ( const dim_vector new_dims) const
inline

Definition at line 98 of file MSparse.h.

References Sparse< T >::reshape().

Referenced by SparseComplexMatrix::reshape(), and SparseMatrix::reshape().

◆ resize() [1/2]

template<typename T >
void Sparse< T >::resize ( const dim_vector dv)
inherited

Definition at line 951 of file Sparse.cc.

References n, and dim_vector::ndims().

◆ resize() [2/2]

◆ resize1()

template<typename T >
void Sparse< T >::resize1 ( octave_idx_type  n)
inherited

Definition at line 932 of file Sparse.cc.

References octave::err_invalid_resize(), max(), and n.

Referenced by Sparse< T >::index().

◆ ridx() [1/4]

template<typename T >
octave_idx_type& Sparse< T >::ridx ( octave_idx_type  i)
inlineinherited

Definition at line 480 of file Sparse.h.

References Sparse< T >::SparseRep::ridx().

◆ ridx() [2/4]

template<typename T >
octave_idx_type Sparse< T >::ridx ( octave_idx_type  i) const
inlineinherited

Definition at line 488 of file Sparse.h.

References Sparse< T >::SparseRep::cridx().

◆ ridx() [3/4]

template<typename T >
octave_idx_type* Sparse< T >::ridx ( void  )
inlineinherited

Definition at line 479 of file Sparse.h.

References Sparse< T >::SparseRep::r.

Referenced by idx_vector::idx_vector_rep::idx_vector_rep(), MatrixType::MatrixType(), Sparse< T >::Sparse(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::sparse_qr_rep(), SparseComplexMatrix::SparseComplexMatrix(), SparseMatrix::SparseMatrix(), SparseComplexMatrix::abs(), octave_sparse_bool_matrix::as_mxArray(), octave_sparse_complex_matrix::as_mxArray(), octave_sparse_matrix::as_mxArray(), Sparse< T >::assign(), binmap(), SparseComplexMatrix::bsolve(), SparseMatrix::bsolve(), Sparse< T >::cat(), octave_sparse_complex_matrix::char_array_value(), octave_sparse_bool_matrix::char_array_value(), octave_sparse_matrix::char_array_value(), SparseComplexMatrix::column(), SparseMatrix::column(), octave_sparse_matrix::convert_to_str_internal(), Sparse< T >::delete_elements(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), dmsolve_insert(), dmsolve_permute(), SparseComplexMatrix::dsolve(), SparseMatrix::dsolve(), elem_xpow(), SparseComplexMatrix::factorize(), SparseMatrix::factorize(), Fcomplex(), find_nonzero_elem_idx(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), Fsymbfact(), SparseComplexMatrix::hermitian(), Sparse< T >::insert(), SparseComplexMatrix::inverse(), SparseMatrix::inverse(), SparseComplexMatrix::ishermitian(), SparseMatrix::issymmetric(), SparseComplexMatrix::ltsolve(), SparseMatrix::ltsolve(), Sparse< T >::map(), SparseComplexMatrix::max(), SparseMatrix::max(), max(), SparseComplexMatrix::min(), SparseMatrix::min(), min(), SparseComplexMatrix::operator!(), SparseMatrix::operator!(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), octave::math::sparse_lu< lu_type >::Pc(), plus_or_minus(), octave::math::sparse_lu< lu_type >::Pr(), product(), quotient(), read_mat5_binary_element(), read_sparse_matrix(), SparseComplexMatrix::row(), SparseMatrix::row(), octave_sparse_bool_matrix::save_binary(), octave_sparse_complex_matrix::save_binary(), octave_sparse_matrix::save_binary(), times_or_divide(), times_or_divides(), SparseComplexMatrix::tinverse(), SparseMatrix::tinverse(), SparseComplexMatrix::trisolve(), SparseMatrix::trisolve(), SparseComplexMatrix::utsolve(), SparseMatrix::utsolve(), x_el_div(), and xpow().

◆ ridx() [4/4]

template<typename T >
octave_idx_type* Sparse< T >::ridx ( void  ) const
inlineinherited

Definition at line 490 of file Sparse.h.

References Sparse< T >::SparseRep::r.

◆ rows()

template<typename T >
octave_idx_type Sparse< T >::rows ( void  ) const
inlineinherited

Definition at line 250 of file Sparse.h.

Referenced by idx_vector::idx_vector_rep::idx_vector_rep(), MatrixType::MatrixType(), Sparse< T >::Sparse(), SparseComplexMatrix::abs(), Sparse< T >::assign(), binmap(), SparseComplexMatrix::bsolve(), SparseMatrix::bsolve(), Sparse< T >::cat(), octave_sparse_complex_matrix::char_array_value(), octave_sparse_bool_matrix::char_array_value(), octave_sparse_matrix::char_array_value(), SparseComplexMatrix::column(), SparseMatrix::column(), SparseBoolMatrix::concat(), SparseComplexMatrix::concat(), SparseMatrix::concat(), octave_sparse_matrix::convert_to_str_internal(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), SparseComplexMatrix::dinverse(), SparseMatrix::dinverse(), dmsolve_insert(), dmsolve_permute(), SparseComplexMatrix::dsolve(), SparseMatrix::dsolve(), elem_xpow(), SparseComplexMatrix::factorize(), SparseMatrix::factorize(), Famd(), Fccolamd(), Fcolamd(), Fcomplex(), Fcsymamd(), Fetree(), find_nonzero_elem_idx(), SparseComplexMatrix::fsolve(), SparseMatrix::fsolve(), Fsymamd(), Fsymbfact(), SparseComplexMatrix::hermitian(), Sparse< T >::insert(), SparseComplexMatrix::inverse(), SparseMatrix::inverse(), SparseComplexMatrix::ishermitian(), SparseMatrix::issymmetric(), SparseComplexMatrix::ltsolve(), SparseMatrix::ltsolve(), octave_sparse_matrix::map(), max(), min(), SparseComplexMatrix::operator!(), SparseMatrix::operator!(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), plus_or_minus(), SparseComplexMatrix::prod(), SparseMatrix::prod(), product(), quotient(), read_sparse_matrix(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::tall_solve(), times_or_divide(), times_or_divides(), SparseComplexMatrix::tinverse(), SparseMatrix::tinverse(), SparseComplexMatrix::trisolve(), SparseMatrix::trisolve(), octave_sparse_bool_matrix::try_narrowing_conversion(), octave_sparse_complex_matrix::try_narrowing_conversion(), octave_sparse_matrix::try_narrowing_conversion(), SparseComplexMatrix::utsolve(), SparseMatrix::utsolve(), octave::math::sparse_qr< SPARSE_T >::sparse_qr_rep< SPARSE_T >::wide_solve(), x_el_div(), and xpow().

◆ sort() [1/2]

◆ sort() [2/2]

template<typename T >
Sparse< T > Sparse< T >::sort ( octave_idx_type  dim = 0,
sortmode  mode = ASCENDING 
) const
inherited

◆ squeeze()

template<typename T >
MSparse<T> MSparse< T >::squeeze ( void  ) const
inline

Definition at line 96 of file MSparse.h.

References Sparse< T >::squeeze().

Referenced by SparseComplexMatrix::squeeze(), and SparseMatrix::squeeze().

◆ test()

template<typename T >
template<typename F , bool zero>
bool Sparse< T >::test ( fcn) const
inlineinherited

Definition at line 552 of file Sparse.h.

◆ test_all() [1/3]

template<typename T >
bool Sparse< T >::test_all ( bool(&)(const T &)  fcn) const
inlineinherited

Definition at line 576 of file Sparse.h.

◆ test_all() [2/3]

template<typename T >
bool Sparse< T >::test_all ( bool(&)(T)  fcn) const
inlineinherited

Definition at line 573 of file Sparse.h.

◆ test_all() [3/3]

template<typename T >
template<typename F >
bool Sparse< T >::test_all ( fcn) const
inlineinherited

Definition at line 563 of file Sparse.h.

◆ test_any() [1/3]

template<typename T >
bool Sparse< T >::test_any ( bool(&)(const T &)  fcn) const
inlineinherited

Definition at line 570 of file Sparse.h.

◆ test_any() [2/3]

template<typename T >
bool Sparse< T >::test_any ( bool(&)(T)  fcn) const
inlineinherited

Definition at line 567 of file Sparse.h.

◆ test_any() [3/3]

template<typename T >
template<typename F >
bool Sparse< T >::test_any ( fcn) const
inlineinherited

◆ transpose()

template<typename T >
MSparse<T> MSparse< T >::transpose ( void  ) const
inline

Definition at line 94 of file MSparse.h.

References Sparse< T >::transpose().

Referenced by SparseComplexMatrix::transpose(), and SparseMatrix::transpose().

◆ xcidx() [1/2]

template<typename T >
octave_idx_type& Sparse< T >::xcidx ( octave_idx_type  i)
inlineinherited

Definition at line 499 of file Sparse.h.

References Sparse< T >::SparseRep::cidx().

◆ xcidx() [2/2]

◆ xdata() [1/2]

template<typename T >
T& Sparse< T >::xdata ( octave_idx_type  i)
inlineinherited

Definition at line 473 of file Sparse.h.

References Sparse< T >::SparseRep::data().

◆ xdata() [2/2]

◆ xelem() [1/6]

template<typename T >
T& Sparse< T >::xelem ( const Array< octave_idx_type > &  ra_idx)
inlineinherited

Definition at line 313 of file Sparse.h.

References compute_index(), and ra_idx.

◆ xelem() [2/6]

template<typename T >
T Sparse< T >::xelem ( const Array< octave_idx_type > &  ra_idx) const
inlineinherited

Definition at line 316 of file Sparse.h.

References compute_index(), and ra_idx.

◆ xelem() [3/6]

template<typename T >
T& Sparse< T >::xelem ( octave_idx_type  i,
octave_idx_type  j 
)
inlineinherited

Definition at line 307 of file Sparse.h.

References Sparse< T >::SparseRep::elem().

◆ xelem() [4/6]

template<typename T >
T Sparse< T >::xelem ( octave_idx_type  i,
octave_idx_type  j 
) const
inlineinherited

Definition at line 308 of file Sparse.h.

References Sparse< T >::SparseRep::celem().

◆ xelem() [5/6]

◆ xelem() [6/6]

template<typename T >
T Sparse< T >::xelem ( octave_idx_type  n) const
inlineinherited

Definition at line 300 of file Sparse.h.

References n.

◆ xridx() [1/2]

template<typename T >
octave_idx_type& Sparse< T >::xridx ( octave_idx_type  i)
inlineinherited

Definition at line 486 of file Sparse.h.

References Sparse< T >::SparseRep::ridx().

◆ xridx() [2/2]

Member Data Documentation

◆ dimensions

template<typename T >
dim_vector Sparse< T >::dimensions
inherited

Definition at line 160 of file Sparse.h.

Referenced by Sparse< T >::Sparse(), and Sparse< T >::operator=().

◆ rep

template<typename T >
Sparse<T>::SparseRep* Sparse< T >::rep
inherited

Definition at line 158 of file Sparse.h.

Referenced by Sparse< T >::Sparse(), and Sparse< T >::operator=().


The documentation for this class was generated from the following file: