GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Sparse< T >::SparseRep Class Reference

#include "Sparse.h"

Collaboration diagram for Sparse< T >::SparseRep:

Public Member Functions

 SparseRep (void)
 
 SparseRep (octave_idx_type n)
 
 SparseRep (octave_idx_type nr, octave_idx_type nc, octave_idx_type nz=0)
 
 SparseRep (const SparseRep &a)
 
 ~SparseRep (void)
 
bool any_element_is_nan (void) const
 
octave_idx_type ccidx (octave_idx_type i) const
 
cdata (octave_idx_type i) const
 
celem (octave_idx_type _r, octave_idx_type _c) const
 
void change_length (octave_idx_type nz)
 
octave_idx_typecidx (octave_idx_type i)
 
octave_idx_type cridx (octave_idx_type i) const
 
T & data (octave_idx_type i)
 
T & elem (octave_idx_type _r, octave_idx_type _c)
 
bool indices_ok (void) const
 
octave_idx_type length (void) const
 
void maybe_compress (bool remove_zeros)
 
octave_idx_type nnz (void) const
 
octave_idx_typeridx (octave_idx_type i)
 

Public Attributes

octave_idx_typec
 
octave::refcount< int > count
 
T * d
 
octave_idx_type ncols
 
octave_idx_type nrows
 
octave_idx_type nzmx
 
octave_idx_typer
 

Private Member Functions

SparseRepoperator= (const SparseRep &a)
 

Detailed Description

template<typename T>
class Sparse< T >::SparseRep

Definition at line 58 of file Sparse.h.

Constructor & Destructor Documentation

◆ SparseRep() [1/4]

template<typename T>
Sparse< T >::SparseRep::SparseRep ( void  )
inline

Definition at line 70 of file Sparse.h.

◆ SparseRep() [2/4]

template<typename T>
Sparse< T >::SparseRep::SparseRep ( octave_idx_type  n)
inline

Definition at line 75 of file Sparse.h.

◆ SparseRep() [3/4]

template<typename T>
Sparse< T >::SparseRep::SparseRep ( octave_idx_type  nr,
octave_idx_type  nc,
octave_idx_type  nz = 0 
)
inline

Definition at line 80 of file Sparse.h.

◆ SparseRep() [4/4]

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

Definition at line 87 of file Sparse.h.

References a, c, and d.

◆ ~SparseRep()

template<typename T>
Sparse< T >::SparseRep::~SparseRep ( void  )
inline

Definition at line 98 of file Sparse.h.

References c, and d.

Member Function Documentation

◆ any_element_is_nan()

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

Definition at line 177 of file Sparse.cc.

References d, i, octave::math::isnan(), and Sparse< T >::nnz().

Referenced by Sparse< bool >::any_element_is_nan().

◆ ccidx()

template<typename T>
octave_idx_type Sparse< T >::SparseRep::ccidx ( octave_idx_type  i) const
inline

Definition at line 118 of file Sparse.h.

References c, and i.

Referenced by Sparse< bool >::cidx().

◆ cdata()

template<typename T>
T Sparse< T >::SparseRep::cdata ( octave_idx_type  i) const
inline

Definition at line 110 of file Sparse.h.

References d, and i.

◆ celem()

template<typename T >
T Sparse< T >::SparseRep::celem ( octave_idx_type  _r,
octave_idx_type  _c 
) const

Definition at line 105 of file Sparse.cc.

References c, d, and i.

Referenced by Sparse< bool >::xelem().

◆ change_length()

template<typename T >
void Sparse< T >::SparseRep::change_length ( octave_idx_type  nz)

Definition at line 140 of file Sparse.cc.

References c, d, and min().

Referenced by Sparse< bool >::change_capacity().

◆ cidx()

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

Definition at line 116 of file Sparse.h.

References c, and i.

Referenced by Sparse< bool >::cidx(), and Sparse< bool >::xcidx().

◆ cridx()

template<typename T>
octave_idx_type Sparse< T >::SparseRep::cridx ( octave_idx_type  i) const
inline

Definition at line 114 of file Sparse.h.

References i.

Referenced by Sparse< bool >::ridx().

◆ data()

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

Definition at line 108 of file Sparse.h.

References d, and i.

Referenced by Sparse< bool >::data(), and Sparse< bool >::xdata().

◆ elem()

template<typename T >
T & Sparse< T >::SparseRep::elem ( octave_idx_type  _r,
octave_idx_type  _c 
)

◆ indices_ok()

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

Definition at line 170 of file Sparse.cc.

References c, Sparse< T >::nnz(), and sparse_indices_ok().

Referenced by Sparse< bool >::indices_ok().

◆ length()

template<typename T>
octave_idx_type Sparse< T >::SparseRep::length ( void  ) const
inline

Definition at line 100 of file Sparse.h.

Referenced by Sparse< bool >::nzmax().

◆ maybe_compress()

template<typename T >
void Sparse< T >::SparseRep::maybe_compress ( bool  remove_zeros)

Definition at line 116 of file Sparse.cc.

References c, d, i, k, and u.

Referenced by Sparse< bool >::maybe_compress().

◆ nnz()

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

Definition at line 102 of file Sparse.h.

References c.

Referenced by Sparse< bool >::nnz().

◆ operator=()

template<typename T>
SparseRep& Sparse< T >::SparseRep::operator= ( const SparseRep a)
private

◆ ridx()

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

Definition at line 112 of file Sparse.h.

References i.

Referenced by Sparse< bool >::ridx(), and Sparse< bool >::xridx().

Member Data Documentation

◆ c

template<typename T>
octave_idx_type* Sparse< T >::SparseRep::c

◆ count

template<typename T>
octave::refcount<int> Sparse< T >::SparseRep::count

Definition at line 68 of file Sparse.h.

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

◆ d

template<typename T>
T* Sparse< T >::SparseRep::d

◆ ncols

template<typename T>
octave_idx_type Sparse< T >::SparseRep::ncols

Definition at line 67 of file Sparse.h.

Referenced by Sparse< T >::SparseRep::elem(), and Sparse< bool >::Sparse().

◆ nrows

template<typename T>
octave_idx_type Sparse< T >::SparseRep::nrows

Definition at line 66 of file Sparse.h.

◆ nzmx

template<typename T>
octave_idx_type Sparse< T >::SparseRep::nzmx

Definition at line 65 of file Sparse.h.

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

◆ r

template<typename T>
octave_idx_type* Sparse< T >::SparseRep::r

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