GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
Sparse< T, Alloc > Class Template Reference

#include "Sparse.h"

Inheritance diagram for Sparse< T, Alloc >:
MSparse< Complex > MSparse< double > SparseComplexMatrix SparseMatrix

Classes

class  SparseRep
 

Public Types

typedef T element_type
 

Public Member Functions

 Sparse ()
 
 Sparse (const Array< T > &a)
 
 Sparse (const Array< T > &a, const octave::idx_vector &r, const octave::idx_vector &c, octave_idx_type nr=-1, octave_idx_type nc=-1, bool sum_terms=true, octave_idx_type nzm=-1)
 
 Sparse (const dim_vector &dv)
 
 Sparse (const dim_vector &dv, octave_idx_type nz)
 
 Sparse (const dim_vector &dv, octave_idx_type nz, T *ptr, octave_idx_type *ridx, octave_idx_type *cidx, const Alloc &xallocator=Alloc())
 
 Sparse (const PermMatrix &a)
 
 Sparse (const Sparse< T, Alloc > &a)
 
 Sparse (const Sparse< T, Alloc > &a, const dim_vector &dv)
 
template<typename U >
 Sparse (const Sparse< U > &a)
 
 Sparse (octave_idx_type n)
 
 Sparse (octave_idx_type nr, octave_idx_type nc)
 
 Sparse (octave_idx_type nr, octave_idx_type nc, octave_idx_type nz)
 
 Sparse (octave_idx_type nr, octave_idx_type nc, T val)
 
virtual ~Sparse ()
 
bool any_element_is_nan () const
 
Array< T > array_value () const
 
void assign (const octave::idx_vector &i, const octave::idx_vector &j, const Sparse< T, Alloc > &rhs)
 
void assign (const octave::idx_vector &i, const octave::idx_vector &j, const T &rhs)
 
void assign (const octave::idx_vector &i, const Sparse< T, Alloc > &rhs)
 
void assign (const octave::idx_vector &i, const T &rhs)
 
std::size_t byte_size () 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_typecidx () const
 
octave_idx_typecidx (octave_idx_type i)
 
octave_idx_type cidx (octave_idx_type i) const
 
octave_idx_type cols () const
 
octave_idx_type columns () const
 
octave_idx_type compute_index (const Array< octave_idx_type > &ra_idx) const
 
T * data ()
 
T * data () const
 
T & data (octave_idx_type i)
 
data (octave_idx_type i) const
 
void delete_elements (const octave::idx_vector &i)
 
void delete_elements (const octave::idx_vector &i, const octave::idx_vector &j)
 
void delete_elements (int dim, const octave::idx_vector &i)
 
Sparse< T, Allocdiag (octave_idx_type k=0) const
 
octave_idx_type dim1 () const
 
octave_idx_type dim2 () const
 
dim_vector dims () 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, Allocindex (const octave::idx_vector &i, bool resize_ok=false) const
 
Sparse< T, Allocindex (const octave::idx_vector &i, const octave::idx_vector &j, bool resize_ok=false) const
 
bool indices_ok () const
 
Sparse< T, Alloc > & insert (const Sparse< T, Alloc > &a, const Array< octave_idx_type > &idx)
 
Sparse< T, Alloc > & insert (const Sparse< T, Alloc > &a, octave_idx_type r, octave_idx_type c)
 
Sparse< T, Allocipermute (const Array< octave_idx_type > &vec) const
 
bool isempty () const
 
bool issquare () const
 
template<typename U , typename F >
Sparse< U > map (F fcn) const
 
template<typename U >
Sparse< U > map (U(&fcn)(const T &)) const
 
template<typename U >
Sparse< U > map (U(&fcn)(T)) const
 
Sparse< T, Allocmaybe_compress (bool remove_zeros=false)
 
octave_idx_type ndims () const
 
octave_idx_type nnz () const
 Actual number of nonzero terms.
 
octave_idx_type numel () const
 
octave_idx_type nzmax () const
 Amount of storage for nonzero elements.
 
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
 
Sparse< T, Alloc > & operator= (const Sparse< T, Alloc > &a)
 
Sparse< T, Allocpermute (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
 
Sparse< T, Allocreshape (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_typeridx () const
 
octave_idx_typeridx (octave_idx_type i)
 
octave_idx_type ridx (octave_idx_type i) const
 
octave_idx_type rows () const
 
Sparse< T, Allocsort (Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
 
Sparse< T, Allocsort (octave_idx_type dim=0, sortmode mode=ASCENDING) const
 
Sparse< T, Allocsqueeze () 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
 
Sparse< T, Alloctranspose () const
 
octave_idx_typexcidx ()
 
octave_idx_typexcidx (octave_idx_type i)
 
T * xdata ()
 
T & xdata (octave_idx_type i)
 
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_typexridx (octave_idx_type i)
 

Static Public Member Functions

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

Protected Member Functions

void make_unique ()
 

Protected Attributes

dim_vector m_dimensions
 
Sparse< T, Alloc >::SparseRep * m_rep
 

Detailed Description

template<typename T, typename Alloc>
class Sparse< T, Alloc >

Definition at line 45 of file Sparse.h.

Member Typedef Documentation

◆ element_type

template<typename T , typename Alloc >
typedef T Sparse< T, Alloc >::element_type

Definition at line 49 of file Sparse.h.

Constructor & Destructor Documentation

◆ Sparse() [1/14]

template<typename T , typename Alloc >
Sparse< T, Alloc >::Sparse ( )
inline

Definition at line 256 of file Sparse.h.

References Sparse< T, Alloc >::SparseRep::m_count.

◆ Sparse() [2/14]

template<typename T , typename Alloc >
Sparse< T, Alloc >::Sparse ( octave_idx_type  n)
inlineexplicit

Definition at line 262 of file Sparse.h.

◆ Sparse() [3/14]

template<typename T , typename Alloc >
Sparse< T, Alloc >::Sparse ( octave_idx_type  nr,
octave_idx_type  nc 
)
inlineexplicit

Definition at line 266 of file Sparse.h.

◆ Sparse() [4/14]

◆ Sparse() [5/14]

template<typename T , typename Alloc >
Sparse< T, Alloc >::Sparse ( const dim_vector dv,
octave_idx_type  nz 
)
inline

Definition at line 272 of file Sparse.h.

◆ Sparse() [6/14]

template<typename T , typename Alloc >
Sparse< T, Alloc >::Sparse ( octave_idx_type  nr,
octave_idx_type  nc,
octave_idx_type  nz 
)
inline

Definition at line 276 of file Sparse.h.

◆ Sparse() [7/14]

template<typename T , typename Alloc >
Sparse< T, Alloc >::Sparse ( const dim_vector dv,
octave_idx_type  nz,
T *  ptr,
octave_idx_type ridx,
octave_idx_type cidx,
const Alloc xallocator = Alloc () 
)
inline

Definition at line 287 of file Sparse.h.

◆ Sparse() [8/14]

template<typename T , typename Alloc >
Sparse< T, Alloc >::Sparse ( const PermMatrix a)
explicit

◆ Sparse() [9/14]

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

Definition at line 300 of file Sparse.h.

◆ Sparse() [10/14]

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

Definition at line 307 of file Sparse.h.

References Sparse< T, Alloc >::SparseRep::m_count.

◆ Sparse() [11/14]

template<typename T , typename Alloc >
Sparse< T, Alloc >::Sparse ( const dim_vector dv)

Definition at line 247 of file Sparse.cc.

References Sparse< T, Alloc >::m_rep, and dim_vector::ndims().

◆ Sparse() [12/14]

template<typename T , typename Alloc >
Sparse< T, Alloc >::Sparse ( const Sparse< T, Alloc > &  a,
const dim_vector dv 
)

Definition at line 259 of file Sparse.cc.

References Sparse< T, Alloc >::cols(), and Sparse< T, Alloc >::rows().

◆ Sparse() [13/14]

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

Definition at line 302 of file Sparse.cc.

◆ Sparse() [14/14]

◆ ~Sparse()

template<typename T , typename Alloc >
Sparse< T, Alloc >::~Sparse ( )
virtual

Definition at line 706 of file Sparse.cc.

Member Function Documentation

◆ any_element_is_nan()

template<typename T , typename Alloc >
bool Sparse< T, Alloc >::any_element_is_nan ( ) const
inline

Definition at line 748 of file Sparse.h.

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

◆ array_value()

template<typename T , typename Alloc >
Array< T > Sparse< T, Alloc >::array_value ( ) const

◆ assign() [1/4]

◆ assign() [2/4]

template<typename T , typename Alloc >
void Sparse< T, Alloc >::assign ( const octave::idx_vector &  i,
const octave::idx_vector &  j,
const T &  rhs 
)

Definition at line 2283 of file Sparse.cc.

◆ assign() [3/4]

◆ assign() [4/4]

template<typename T , typename Alloc >
void Sparse< T, Alloc >::assign ( const octave::idx_vector &  i,
const T &  rhs 
)

Definition at line 2032 of file Sparse.cc.

◆ byte_size()

template<typename T , typename Alloc >
std::size_t Sparse< T, Alloc >::byte_size ( ) const
inline

Definition at line 361 of file Sparse.h.

◆ cat()

◆ change_capacity()

template<typename T , typename Alloc >
void Sparse< T, Alloc >::change_capacity ( octave_idx_type  nz)
inline

◆ checkelem() [1/6]

template<typename T , typename Alloc >
T & Sparse< T, Alloc >::checkelem ( const Array< octave_idx_type > &  ra_idx)
inline

Definition at line 443 of file Sparse.h.

References compute_index(), and ra_idx.

◆ checkelem() [2/6]

template<typename T , typename Alloc >
T Sparse< T, Alloc >::checkelem ( const Array< octave_idx_type > &  ra_idx) const
inline

Definition at line 499 of file Sparse.h.

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

◆ checkelem() [3/6]

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

Definition at line 432 of file Sparse.h.

◆ checkelem() [4/6]

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

Definition at line 491 of file Sparse.h.

◆ checkelem() [5/6]

template<typename T , typename Alloc >
T & Sparse< T, Alloc >::checkelem ( octave_idx_type  n)
inline

Definition at line 421 of file Sparse.h.

References numel().

◆ checkelem() [6/6]

template<typename T , typename Alloc >
T Sparse< T, Alloc >::checkelem ( octave_idx_type  n) const
inline

Definition at line 483 of file Sparse.h.

References numel().

◆ cidx() [1/4]

template<typename T , typename Alloc >
octave_idx_type * Sparse< T, Alloc >::cidx ( )
inline

Definition at line 593 of file Sparse.h.

References Sparse< T, Alloc >::SparseRep::m_cidx.

Referenced by MatrixType::MatrixType(), Sparse< T, Alloc >::Sparse(), SparseComplexMatrix::SparseComplexMatrix(), SparseComplexMatrix::SparseComplexMatrix(), SparseMatrix::SparseMatrix(), SparseMatrix::SparseMatrix(), SparseComplexMatrix::abs(), octave_sparse_bool_matrix::as_mxArray(), octave_sparse_complex_matrix::as_mxArray(), octave_sparse_matrix::as_mxArray(), Sparse< T, Alloc >::assign(), binmap(), binmap(), binmap(), Sparse< T, Alloc >::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(), column_norms(), octave_sparse_matrix::convert_to_str_internal(), Sparse< T, Alloc >::delete_elements(), Sparse< T, Alloc >::delete_elements(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), elem_xdiv(), elem_xdiv(), elem_xdiv(), elem_xdiv(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), Fcomplex(), find_nonzero_elem_idx(), Fsymbfact(), SparseComplexMatrix::hermitian(), Sparse< T, Alloc >::index(), Sparse< T, Alloc >::index(), Sparse< T, Alloc >::insert(), SparseComplexMatrix::inverse(), SparseMatrix::inverse(), SparseComplexMatrix::ishermitian(), SparseMatrix::issymmetric(), octave_sparse_bool_matrix::load_binary(), octave_sparse_complex_matrix::load_binary(), Sparse< T, Alloc >::map(), SparseComplexMatrix::max(), SparseMatrix::max(), max(), max(), max(), max(), SparseComplexMatrix::min(), SparseMatrix::min(), min(), min(), min(), min(), SparseBoolMatrix::operator!(), SparseComplexMatrix::operator!(), SparseMatrix::operator!(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), sparse_lu< lu_type >::Pc(), plus_or_minus(), plus_or_minus(), plus_or_minus(), plus_or_minus(), sparse_lu< lu_type >::Pr(), SparseComplexMatrix::prod(), SparseMatrix::prod(), product(), quotient(), read_mat5_binary_element(), read_sparse_matrix(), SparseComplexMatrix::row(), SparseMatrix::row(), row_norms(), octave_sparse_bool_matrix::save_binary(), octave_sparse_complex_matrix::save_binary(), octave_sparse_matrix::save_binary(), save_mat5_binary_element(), save_mat_binary_data(), Sparse< T, Alloc >::sort(), Sparse< T, Alloc >::sort(), times_or_divide(), times_or_divides(), xpow(), and xpow().

◆ cidx() [2/4]

template<typename T , typename Alloc >
octave_idx_type * Sparse< T, Alloc >::cidx ( ) const
inline

Definition at line 604 of file Sparse.h.

References Sparse< T, Alloc >::SparseRep::m_cidx.

◆ cidx() [3/4]

template<typename T , typename Alloc >
octave_idx_type & Sparse< T, Alloc >::cidx ( octave_idx_type  i)
inline

Definition at line 594 of file Sparse.h.

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

◆ cidx() [4/4]

template<typename T , typename Alloc >
octave_idx_type Sparse< T, Alloc >::cidx ( octave_idx_type  i) const
inline

Definition at line 602 of file Sparse.h.

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

◆ cols()

template<typename T , typename Alloc >
octave_idx_type Sparse< T, Alloc >::cols ( ) const
inline

Definition at line 349 of file Sparse.h.

Referenced by MatrixType::MatrixType(), Sparse< T, Alloc >::Sparse(), Sparse< T, Alloc >::Sparse(), SparseComplexMatrix::SparseComplexMatrix(), SparseMatrix::SparseMatrix(), SparseComplexMatrix::abs(), Sparse< T, Alloc >::assign(), binmap(), binmap(), binmap(), 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(), SparseComplexMatrix::concat(), SparseMatrix::concat(), octave_sparse_matrix::convert_to_str_internal(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), elem_xdiv(), elem_xdiv(), elem_xdiv(), elem_xdiv(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), F__ilu0__(), F__iluc__(), F__ilutp__(), Famd(), Fccolamd(), Fcolamd(), Fcomplex(), Fcsymamd(), Fetree(), find_nonzero_elem_idx(), Fsymamd(), Fsymbfact(), SparseComplexMatrix::hermitian(), Sparse< T, Alloc >::insert(), SparseComplexMatrix::inverse(), SparseMatrix::inverse(), SparseComplexMatrix::ishermitian(), SparseMatrix::issymmetric(), octave_sparse_matrix::map(), max(), max(), min(), min(), SparseComplexMatrix::operator!(), SparseMatrix::operator!(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), plus_or_minus(), plus_or_minus(), plus_or_minus(), plus_or_minus(), product(), quotient(), read_sparse_matrix(), octave_sparse_bool_matrix::save_hdf5(), octave_sparse_complex_matrix::save_hdf5(), octave_sparse_matrix::save_hdf5(), save_mat5_binary_element(), save_mat5_element_length(), times_or_divide(), times_or_divides(), xpow(), and xpow().

◆ columns()

◆ compute_index()

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

Definition at line 733 of file Sparse.cc.

References octave_base_value::numel(), and ra_idx.

◆ data() [1/4]

template<typename T , typename Alloc >
T * Sparse< T, Alloc >::data ( )
inline

Definition at line 571 of file Sparse.h.

References Sparse< T, Alloc >::SparseRep::m_data.

Referenced by MatrixType::MatrixType(), Sparse< T, Alloc >::Sparse(), sparse_lu< lu_type >::sparse_lu(), sparse_lu< lu_type >::sparse_lu(), SparseComplexMatrix::SparseComplexMatrix(), SparseComplexMatrix::SparseComplexMatrix(), SparseMatrix::SparseMatrix(), 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(), SparseBoolMatrix::any(), 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, Alloc >::assign(), Sparse< T, Alloc >::assign(), binmap(), binmap(), binmap(), Sparse< T, Alloc >::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(), column_norms(), octave_sparse_matrix::convert_to_str_internal(), Sparse< T, Alloc >::delete_elements(), Sparse< T, Alloc >::delete_elements(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), elem_xdiv(), elem_xdiv(), elem_xdiv(), elem_xdiv(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), Fcomplex(), find_nonzero_elem_idx(), Fsymbfact(), SparseComplexMatrix::hermitian(), Sparse< T, Alloc >::index(), Sparse< T, Alloc >::index(), Sparse< T, Alloc >::insert(), SparseComplexMatrix::ishermitian(), SparseMatrix::issymmetric(), octave_sparse_bool_matrix::load_binary(), octave_sparse_complex_matrix::load_binary(), Sparse< T, Alloc >::map(), map_2_xldexp_sparse(), SparseComplexMatrix::max(), SparseMatrix::max(), max(), max(), max(), max(), SparseComplexMatrix::min(), SparseMatrix::min(), min(), min(), min(), min(), SparseBoolMatrix::operator!(), SparseComplexMatrix::operator!(), SparseMatrix::operator!(), operator-(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), sparse_lu< lu_type >::Pc(), plus_or_minus(), plus_or_minus(), plus_or_minus(), plus_or_minus(), sparse_lu< lu_type >::Pr(), product(), quotient(), read_mat5_binary_element(), read_sparse_matrix(), SparseComplexMatrix::row(), SparseMatrix::row(), row_norms(), octave_sparse_bool_matrix::save_binary(), octave_sparse_complex_matrix::save_binary(), octave_sparse_matrix::save_binary(), save_mat5_binary_element(), save_mat5_element_length(), save_mat_binary_data(), Sparse< T, Alloc >::sort(), Sparse< T, Alloc >::sort(), times_or_divide(), times_or_divides(), xpow(), and xpow().

◆ data() [2/4]

template<typename T , typename Alloc >
T * Sparse< T, Alloc >::data ( ) const
inline

Definition at line 578 of file Sparse.h.

References Sparse< T, Alloc >::SparseRep::m_data.

◆ data() [3/4]

template<typename T , typename Alloc >
T & Sparse< T, Alloc >::data ( octave_idx_type  i)
inline

Definition at line 572 of file Sparse.h.

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

◆ data() [4/4]

template<typename T , typename Alloc >
T Sparse< T, Alloc >::data ( octave_idx_type  i) const
inline

Definition at line 576 of file Sparse.h.

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

◆ delete_elements() [1/3]

template<typename T , typename Alloc >
void Sparse< T, Alloc >::delete_elements ( const octave::idx_vector &  i)

◆ delete_elements() [2/3]

template<typename T , typename Alloc >
void Sparse< T, Alloc >::delete_elements ( const octave::idx_vector &  i,
const octave::idx_vector &  j 
)

◆ delete_elements() [3/3]

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

Definition at line 1420 of file Sparse.cc.

References current_liboctave_error_handler.

◆ diag()

template<typename T , typename Alloc >
Sparse< T, Alloc > Sparse< T, Alloc >::diag ( octave_idx_type  k = 0) const

Definition at line 2492 of file Sparse.cc.

References d.

Referenced by SparseBoolMatrix::diag(), and MSparse< T >::diag().

◆ dim1()

template<typename T , typename Alloc >
octave_idx_type Sparse< T, Alloc >::dim1 ( ) const
inline

Definition at line 345 of file Sparse.h.

◆ dim2()

template<typename T , typename Alloc >
octave_idx_type Sparse< T, Alloc >::dim2 ( ) const
inline

Definition at line 346 of file Sparse.h.

◆ dims()

◆ elem() [1/6]

template<typename T , typename Alloc >
T & Sparse< T, Alloc >::elem ( const Array< octave_idx_type > &  ra_idx)
inline

Definition at line 465 of file Sparse.h.

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

◆ elem() [2/6]

template<typename T , typename Alloc >
T Sparse< T, Alloc >::elem ( const Array< octave_idx_type > &  ra_idx) const
inline

Definition at line 513 of file Sparse.h.

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

◆ elem() [3/6]

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

Definition at line 459 of file Sparse.h.

◆ elem() [4/6]

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

Definition at line 511 of file Sparse.h.

◆ elem() [5/6]

◆ elem() [6/6]

template<typename T , typename Alloc >
T Sparse< T, Alloc >::elem ( octave_idx_type  n) const
inline

Definition at line 509 of file Sparse.h.

◆ get_col_index()

template<typename T , typename Alloc >
octave_idx_type Sparse< T, Alloc >::get_col_index ( octave_idx_type  k)
inline

Definition at line 353 of file Sparse.h.

◆ get_row_index()

template<typename T , typename Alloc >
octave_idx_type Sparse< T, Alloc >::get_row_index ( octave_idx_type  k)
inline

Definition at line 352 of file Sparse.h.

◆ index() [1/2]

◆ index() [2/2]

◆ indices_ok()

◆ insert() [1/2]

template<typename T , typename Alloc >
Sparse< T, Alloc > & Sparse< T, Alloc >::insert ( const Sparse< T, Alloc > &  a,
const Array< octave_idx_type > &  idx 
)

Definition at line 1126 of file Sparse.cc.

References octave_base_value::numel(), and ra_idx.

◆ insert() [2/2]

◆ ipermute()

template<typename T , typename Alloc >
Sparse< T, Alloc > Sparse< T, Alloc >::ipermute ( const Array< octave_idx_type > &  vec) const
inline

Definition at line 542 of file Sparse.h.

Referenced by SparseBoolMatrix::ipermute(), and MSparse< T >::ipermute().

◆ isempty()

template<typename T , typename Alloc >
bool Sparse< T, Alloc >::isempty ( ) const
inline

Definition at line 567 of file Sparse.h.

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

◆ issquare()

template<typename T , typename Alloc >
bool Sparse< T, Alloc >::issquare ( ) const
inline

Definition at line 565 of file Sparse.h.

◆ make_unique()

template<typename T , typename Alloc >
void Sparse< T, Alloc >::make_unique ( )
inlineprotected

Definition at line 231 of file Sparse.h.

◆ map() [1/3]

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

◆ map() [2/3]

template<typename T , typename Alloc >
template<typename U >
Sparse< U > Sparse< T, Alloc >::map ( U(&)(const T &)  fcn) const
inline

Definition at line 743 of file Sparse.h.

◆ map() [3/3]

template<typename T , typename Alloc >
template<typename U >
Sparse< U > Sparse< T, Alloc >::map ( U(&)(T)  fcn) const
inline

Definition at line 738 of file Sparse.h.

◆ maybe_compress()

◆ ndims()

template<typename T , typename Alloc >
octave_idx_type Sparse< T, Alloc >::ndims ( ) const
inline

Definition at line 606 of file Sparse.h.

References dim_vector::ndims().

◆ nnz()

template<typename T , typename Alloc >
octave_idx_type Sparse< T, Alloc >::nnz ( ) const
inline

Actual number of nonzero terms.

Definition at line 336 of file Sparse.h.

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

Referenced by MatrixType::MatrixType(), 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, Alloc >::SparseRep::any_element_is_nan(), SparseMatrix::any_element_is_negative(), SparseMatrix::any_element_not_one_or_zero(), Sparse< T, Alloc >::assign(), Sparse< T, Alloc >::assign(), binmap(), binmap(), binmap(), Sparse< T, Alloc >::cat(), Sparse< T, Alloc >::delete_elements(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), Fccolamd(), Fcolamd(), Fcomplex(), find_nonzero_elem_idx(), Fsymbfact(), SparseComplexMatrix::hermitian(), octave_sparse_matrix::index_vector(), Sparse< T, Alloc >::SparseRep::indices_ok(), Sparse< T, Alloc >::insert(), SparseComplexMatrix::inverse(), SparseMatrix::inverse(), map_2_xldexp_sparse(), max(), max(), min(), min(), SparseComplexMatrix::operator!(), SparseMatrix::operator!(), operator-(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), plus_or_minus(), plus_or_minus(), product(), quotient(), octave_sparse_complex_matrix::save_binary(), octave_sparse_matrix::save_binary(), octave_sparse_bool_matrix::save_hdf5(), octave_sparse_complex_matrix::save_hdf5(), octave_sparse_matrix::save_hdf5(), save_mat5_binary_element(), save_mat5_element_length(), times_or_divide(), times_or_divides(), xpow(), and xpow().

◆ numel()

◆ nzmax()

template<typename T , typename Alloc >
octave_idx_type Sparse< T, Alloc >::nzmax ( ) const
inline

Amount of storage for nonzero elements.

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

Definition at line 333 of file Sparse.h.

References Sparse< T, Alloc >::SparseRep::nzmax().

Referenced by read_sparse_matrix(), and save_mat5_binary_element().

◆ operator()() [1/6]

template<typename T , typename Alloc >
T & Sparse< T, Alloc >::operator() ( const Array< octave_idx_type > &  ra_idx)
inline

Definition at line 478 of file Sparse.h.

References ra_idx.

◆ operator()() [2/6]

template<typename T , typename Alloc >
T Sparse< T, Alloc >::operator() ( const Array< octave_idx_type > &  ra_idx) const
inline

Definition at line 523 of file Sparse.h.

References ra_idx.

◆ operator()() [3/6]

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

Definition at line 473 of file Sparse.h.

◆ operator()() [4/6]

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

Definition at line 518 of file Sparse.h.

◆ operator()() [5/6]

template<typename T , typename Alloc >
T & Sparse< T, Alloc >::operator() ( octave_idx_type  n)
inline

Definition at line 468 of file Sparse.h.

◆ operator()() [6/6]

template<typename T , typename Alloc >
T Sparse< T, Alloc >::operator() ( octave_idx_type  n) const
inline

Definition at line 516 of file Sparse.h.

◆ operator=()

template<typename T , typename Alloc >
Sparse< T, Alloc > & Sparse< T, Alloc >::operator= ( const Sparse< T, Alloc > &  a)

◆ permute()

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

Definition at line 930 of file Sparse.cc.

References Array< T, Alloc >::numel().

Referenced by SparseBoolMatrix::permute(), and MSparse< T >::permute().

◆ print_info()

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

Definition at line 3094 of file Sparse.cc.

◆ range_error() [1/6]

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

Definition at line 822 of file Sparse.cc.

References octave_base_value::numel(), and ra_idx.

◆ range_error() [2/6]

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

Definition at line 797 of file Sparse.cc.

References octave_base_value::numel(), and ra_idx.

◆ range_error() [3/6]

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

Definition at line 786 of file Sparse.cc.

◆ range_error() [4/6]

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

Definition at line 775 of file Sparse.cc.

◆ range_error() [5/6]

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

Definition at line 766 of file Sparse.cc.

◆ range_error() [6/6]

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

Definition at line 757 of file Sparse.cc.

◆ reshape()

◆ resize() [1/2]

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

Definition at line 979 of file Sparse.cc.

References dim_vector::ndims().

◆ resize() [2/2]

◆ resize1()

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

Definition at line 959 of file Sparse.cc.

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

◆ ridx() [1/4]

template<typename T , typename Alloc >
octave_idx_type * Sparse< T, Alloc >::ridx ( )
inline

Definition at line 580 of file Sparse.h.

References Sparse< T, Alloc >::SparseRep::m_ridx.

Referenced by MatrixType::MatrixType(), Sparse< T, Alloc >::Sparse(), SparseComplexMatrix::SparseComplexMatrix(), SparseComplexMatrix::SparseComplexMatrix(), SparseMatrix::SparseMatrix(), SparseMatrix::SparseMatrix(), SparseComplexMatrix::abs(), SparseBoolMatrix::any(), octave_sparse_bool_matrix::as_mxArray(), octave_sparse_complex_matrix::as_mxArray(), octave_sparse_matrix::as_mxArray(), Sparse< T, Alloc >::assign(), Sparse< T, Alloc >::assign(), binmap(), binmap(), binmap(), Sparse< T, Alloc >::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, Alloc >::delete_elements(), Sparse< T, Alloc >::delete_elements(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), elem_xdiv(), elem_xdiv(), elem_xdiv(), elem_xdiv(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), Fcomplex(), find_nonzero_elem_idx(), Fsymbfact(), SparseComplexMatrix::hermitian(), Sparse< T, Alloc >::index(), Sparse< T, Alloc >::index(), Sparse< T, Alloc >::insert(), SparseComplexMatrix::inverse(), SparseMatrix::inverse(), SparseComplexMatrix::ishermitian(), SparseMatrix::issymmetric(), octave_sparse_bool_matrix::load_binary(), octave_sparse_complex_matrix::load_binary(), Sparse< T, Alloc >::map(), SparseComplexMatrix::max(), SparseMatrix::max(), max(), max(), max(), max(), SparseComplexMatrix::min(), SparseMatrix::min(), min(), min(), min(), SparseBoolMatrix::operator!(), SparseComplexMatrix::operator!(), SparseMatrix::operator!(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), sparse_lu< lu_type >::Pc(), plus_or_minus(), plus_or_minus(), plus_or_minus(), plus_or_minus(), sparse_lu< lu_type >::Pr(), product(), quotient(), read_mat5_binary_element(), read_sparse_matrix(), SparseComplexMatrix::row(), SparseMatrix::row(), row_norms(), octave_sparse_bool_matrix::save_binary(), octave_sparse_complex_matrix::save_binary(), octave_sparse_matrix::save_binary(), save_mat5_binary_element(), save_mat_binary_data(), Sparse< T, Alloc >::sort(), Sparse< T, Alloc >::sort(), SparseBoolMatrix::sum(), times_or_divide(), times_or_divides(), xpow(), and xpow().

◆ ridx() [2/4]

template<typename T , typename Alloc >
octave_idx_type * Sparse< T, Alloc >::ridx ( ) const
inline

Definition at line 591 of file Sparse.h.

References Sparse< T, Alloc >::SparseRep::m_ridx.

◆ ridx() [3/4]

template<typename T , typename Alloc >
octave_idx_type & Sparse< T, Alloc >::ridx ( octave_idx_type  i)
inline

Definition at line 581 of file Sparse.h.

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

◆ ridx() [4/4]

template<typename T , typename Alloc >
octave_idx_type Sparse< T, Alloc >::ridx ( octave_idx_type  i) const
inline

Definition at line 589 of file Sparse.h.

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

◆ rows()

template<typename T , typename Alloc >
octave_idx_type Sparse< T, Alloc >::rows ( ) const
inline

Definition at line 348 of file Sparse.h.

Referenced by MatrixType::MatrixType(), Sparse< T, Alloc >::Sparse(), Sparse< T, Alloc >::Sparse(), SparseComplexMatrix::abs(), Sparse< T, Alloc >::assign(), binmap(), binmap(), binmap(), Sparse< T, Alloc >::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(), SparseComplexMatrix::concat(), SparseMatrix::concat(), octave_sparse_matrix::convert_to_str_internal(), SparseComplexMatrix::determinant(), SparseMatrix::determinant(), elem_xdiv(), elem_xdiv(), elem_xdiv(), elem_xdiv(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), Famd(), Fccolamd(), Fcolamd(), Fcomplex(), Fcsymamd(), Fetree(), find_nonzero_elem_idx(), Fsymamd(), Fsymbfact(), SparseComplexMatrix::hermitian(), Sparse< T, Alloc >::insert(), SparseComplexMatrix::inverse(), SparseMatrix::inverse(), SparseComplexMatrix::ishermitian(), SparseMatrix::issymmetric(), octave_sparse_matrix::map(), max(), max(), max(), max(), min(), min(), min(), min(), SparseComplexMatrix::operator!(), SparseMatrix::operator!(), SparseBoolMatrix::operator==(), SparseComplexMatrix::operator==(), SparseMatrix::operator==(), plus_or_minus(), plus_or_minus(), plus_or_minus(), plus_or_minus(), SparseComplexMatrix::prod(), SparseMatrix::prod(), product(), quotient(), read_sparse_matrix(), row_norms(), octave_sparse_bool_matrix::save_hdf5(), octave_sparse_complex_matrix::save_hdf5(), octave_sparse_matrix::save_hdf5(), Sparse< T, Alloc >::sort(), Sparse< T, Alloc >::sort(), times_or_divide(), times_or_divides(), xpow(), and xpow().

◆ sort() [1/2]

◆ sort() [2/2]

◆ squeeze()

template<typename T , typename Alloc >
Sparse< T, Alloc > Sparse< T, Alloc >::squeeze ( ) const
inline

Definition at line 370 of file Sparse.h.

Referenced by SparseBoolMatrix::squeeze(), and MSparse< T >::squeeze().

◆ test()

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

Definition at line 653 of file Sparse.h.

◆ test_all() [1/3]

template<typename T , typename Alloc >
bool Sparse< T, Alloc >::test_all ( bool(&)(const T &)  fcn) const
inline

Definition at line 677 of file Sparse.h.

◆ test_all() [2/3]

template<typename T , typename Alloc >
bool Sparse< T, Alloc >::test_all ( bool(&)(T)  fcn) const
inline

Definition at line 674 of file Sparse.h.

◆ test_all() [3/3]

template<typename T , typename Alloc >
template<typename F >
bool Sparse< T, Alloc >::test_all ( fcn) const
inline

Definition at line 664 of file Sparse.h.

◆ test_any() [1/3]

template<typename T , typename Alloc >
bool Sparse< T, Alloc >::test_any ( bool(&)(const T &)  fcn) const
inline

Definition at line 671 of file Sparse.h.

◆ test_any() [2/3]

template<typename T , typename Alloc >
bool Sparse< T, Alloc >::test_any ( bool(&)(T)  fcn) const
inline

Definition at line 668 of file Sparse.h.

◆ test_any() [3/3]

template<typename T , typename Alloc >
template<typename F >
bool Sparse< T, Alloc >::test_any ( fcn) const
inline

◆ transpose()

◆ xcidx() [1/2]

◆ xcidx() [2/2]

template<typename T , typename Alloc >
octave_idx_type & Sparse< T, Alloc >::xcidx ( octave_idx_type  i)
inline

Definition at line 600 of file Sparse.h.

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

◆ xdata() [1/2]

◆ xdata() [2/2]

template<typename T , typename Alloc >
T & Sparse< T, Alloc >::xdata ( octave_idx_type  i)
inline

Definition at line 574 of file Sparse.h.

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

◆ xelem() [1/6]

template<typename T , typename Alloc >
T & Sparse< T, Alloc >::xelem ( const Array< octave_idx_type > &  ra_idx)
inline

Definition at line 412 of file Sparse.h.

References compute_index(), and ra_idx.

◆ xelem() [2/6]

template<typename T , typename Alloc >
T Sparse< T, Alloc >::xelem ( const Array< octave_idx_type > &  ra_idx) const
inline

Definition at line 415 of file Sparse.h.

References compute_index(), and ra_idx.

◆ xelem() [3/6]

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

Definition at line 406 of file Sparse.h.

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

◆ xelem() [4/6]

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

Definition at line 407 of file Sparse.h.

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

◆ xelem() [5/6]

template<typename T , typename Alloc >
T & Sparse< T, Alloc >::xelem ( octave_idx_type  n)
inline

Definition at line 392 of file Sparse.h.

Referenced by elem_xpow(), elem_xpow(), elem_xpow(), elem_xpow(), and map_2_xldexp_sparse().

◆ xelem() [6/6]

template<typename T , typename Alloc >
T Sparse< T, Alloc >::xelem ( octave_idx_type  n) const
inline

Definition at line 399 of file Sparse.h.

◆ xridx() [1/2]

◆ xridx() [2/2]

template<typename T , typename Alloc >
octave_idx_type & Sparse< T, Alloc >::xridx ( octave_idx_type  i)
inline

Definition at line 587 of file Sparse.h.

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

Member Data Documentation

◆ m_dimensions

template<typename T , typename Alloc >
dim_vector Sparse< T, Alloc >::m_dimensions
protected

◆ m_rep

template<typename T , typename Alloc >
Sparse<T,Alloc>::SparseRep* Sparse< T, Alloc >::m_rep
protected

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