GNU Octave  6.2.0
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 (const SparseRep &a)
 
 SparseRep (octave_idx_type n)
 
 SparseRep (octave_idx_type nr, octave_idx_type nc, octave_idx_type nz=1)
 
 SparseRep (void)
 
 ~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< octave_idx_typecount
 
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 59 of file Sparse.h.

Constructor & Destructor Documentation

◆ SparseRep() [1/4]

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

Definition at line 71 of file Sparse.h.

◆ SparseRep() [2/4]

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

Definition at line 77 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 = 1 
)
inline

Definition at line 83 of file Sparse.h.

◆ SparseRep() [4/4]

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

◆ ~SparseRep()

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

Definition at line 101 of file Sparse.h.

References d, and r.

Member Function Documentation

◆ any_element_is_nan()

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

Definition at line 182 of file Sparse.cc.

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

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

◆ ccidx()

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

Definition at line 121 of file Sparse.h.

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

◆ cdata()

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

Definition at line 113 of file Sparse.h.

References d.

◆ celem()

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

Definition at line 107 of file Sparse.cc.

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

◆ change_length()

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

Definition at line 142 of file Sparse.cc.

References min(), and r.

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

◆ cidx()

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

Definition at line 119 of file Sparse.h.

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

◆ cridx()

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

Definition at line 117 of file Sparse.h.

References r.

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

◆ data()

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

Definition at line 111 of file Sparse.h.

References d.

Referenced by Sparse< T >::data(), and Sparse< T >::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 175 of file Sparse.cc.

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

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

◆ length()

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

Definition at line 103 of file Sparse.h.

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

◆ maybe_compress()

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

Definition at line 118 of file Sparse.cc.

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

◆ nnz()

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

Definition at line 105 of file Sparse.h.

Referenced by Sparse< T >::SparseRep::SparseRep(), and Sparse< T >::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 115 of file Sparse.h.

References r.

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

Member Data Documentation

◆ c

◆ count

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

Definition at line 69 of file Sparse.h.

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

◆ d

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

◆ ncols

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

Definition at line 68 of file Sparse.h.

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

◆ nrows

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

Definition at line 67 of file Sparse.h.

◆ nzmx

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

Definition at line 66 of file Sparse.h.

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

◆ r


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