Navigation

Operators and Keywords

Function List:

C++ API

Sparse< T > Class Template Reference

#include <Sparse.h>

Inherited by MSparse< T >.

Collaboration diagram for Sparse< T >:

List of all members.

Classes

class  SparseRep

Public Types

typedef T element_type

Public Member Functions

 Sparse (void)
 Sparse (octave_idx_type n)
 Sparse (octave_idx_type nr, octave_idx_type nc)
 Sparse (octave_idx_type nr, octave_idx_type nc, T val)
 Sparse (const dim_vector &dv, octave_idx_type nz)
 Sparse (octave_idx_type nr, octave_idx_type nc, octave_idx_type nz)
template<class U >
 Sparse (const Sparse< U > &a)
 Sparse (const Sparse< T > &a)
 Sparse (const dim_vector &dv)
 Sparse (const Sparse< T > &a, const dim_vector &dv)
 Sparse (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)
 Sparse (const Array< T > &a)
virtual ~Sparse (void)
Sparse< T > & operator= (const Sparse< T > &a)
octave_idx_type nzmax (void) const
octave_idx_type capacity (void) const
octave_idx_type nnz (void) const
octave_idx_type numel (void) const
octave_idx_type nelem (void) const
octave_idx_type length (void) const
octave_idx_type dim1 (void) const
octave_idx_type dim2 (void) const
octave_idx_type rows (void) const
octave_idx_type cols (void) const
octave_idx_type columns (void) const
octave_idx_type get_row_index (octave_idx_type k)
octave_idx_type get_col_index (octave_idx_type k)
size_t byte_size (void) const
dim_vector dims (void) const
Sparse< T > squeeze (void) const
octave_idx_type compute_index (const Array< octave_idx_type > &ra_idx) const
range_error (const char *fcn, octave_idx_type n) const
T & range_error (const char *fcn, octave_idx_type n)
range_error (const char *fcn, octave_idx_type i, octave_idx_type j) const
T & range_error (const char *fcn, octave_idx_type i, octave_idx_type j)
range_error (const char *fcn, const Array< octave_idx_type > &ra_idx) const
T & range_error (const char *fcn, const Array< octave_idx_type > &ra_idx)
T & xelem (octave_idx_type n)
xelem (octave_idx_type n) const
T & xelem (octave_idx_type i, octave_idx_type j)
xelem (octave_idx_type i, octave_idx_type j) const
T & xelem (const Array< octave_idx_type > &ra_idx)
xelem (const Array< octave_idx_type > &ra_idx) const
T & checkelem (octave_idx_type n)
T & checkelem (octave_idx_type i, octave_idx_type j)
T & checkelem (const Array< octave_idx_type > &ra_idx)
T & elem (octave_idx_type n)
T & elem (octave_idx_type i, octave_idx_type j)
T & elem (const Array< octave_idx_type > &ra_idx)
T & operator() (octave_idx_type n)
T & operator() (octave_idx_type i, octave_idx_type j)
T & operator() (const Array< octave_idx_type > &ra_idx)
checkelem (octave_idx_type n) const
checkelem (octave_idx_type i, octave_idx_type j) const
checkelem (const Array< octave_idx_type > &ra_idx) const
elem (octave_idx_type n) const
elem (octave_idx_type i, octave_idx_type j) const
elem (const Array< octave_idx_type > &ra_idx) const
operator() (octave_idx_type n) const
operator() (octave_idx_type i, octave_idx_type j) const
operator() (const Array< octave_idx_type > &ra_idx) const
Sparse< T > maybe_compress (bool remove_zeros=false)
Sparse< T > reshape (const dim_vector &new_dims) const
Sparse< T > permute (const Array< octave_idx_type > &vec, bool inv=false) const
Sparse< T > ipermute (const Array< octave_idx_type > &vec) const
void resize1 (octave_idx_type n)
void resize (octave_idx_type r, octave_idx_type c)
void resize (const dim_vector &dv)
void change_capacity (octave_idx_type nz)
Sparse< T > & insert (const Sparse< T > &a, octave_idx_type r, octave_idx_type c)
Sparse< T > & insert (const Sparse< T > &a, const Array< octave_idx_type > &idx)
bool is_square (void) const
bool is_empty (void) const
Sparse< T > transpose (void) const
T * data (void)
T & data (octave_idx_type i)
T * xdata (void)
T & xdata (octave_idx_type i)
data (octave_idx_type i) const
T * data (void) const
octave_idx_typeridx (void)
octave_idx_typeridx (octave_idx_type i)
octave_idx_typexridx (void)
octave_idx_typexridx (octave_idx_type i)
octave_idx_type ridx (octave_idx_type i) const
octave_idx_typeridx (void) const
octave_idx_typecidx (void)
octave_idx_typecidx (octave_idx_type i)
octave_idx_typexcidx (void)
octave_idx_typexcidx (octave_idx_type i)
octave_idx_type cidx (octave_idx_type i) const
octave_idx_typecidx (void) const
octave_idx_type ndims (void) const
void delete_elements (const idx_vector &i)
void delete_elements (int dim, const idx_vector &i)
void delete_elements (const idx_vector &i, const idx_vector &j)
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
void assign (const idx_vector &i, const Sparse< T > &rhs)
void assign (const idx_vector &i, const idx_vector &j, const Sparse< T > &rhs)
void print_info (std::ostream &os, const std::string &prefix) const
void * mex_get_data (void) const
octave_idx_typemex_get_ir (void) const
octave_idx_typemex_get_jc (void) const
Sparse< T > sort (octave_idx_type dim=0, sortmode mode=ASCENDING) const
Sparse< T > sort (Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
Sparse< T > diag (octave_idx_type k=0) const
Array< T > array_value (void) const
template<class U , class F >
Sparse< U > map (F fcn) const
template<class U >
Sparse< U > map (U(&fcn)(T)) const
template<class U >
Sparse< U > map (U(&fcn)(const T &)) const
bool indices_ok (void) const

Static Public Member Functions

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

Public Attributes

Sparse< T >::SparseReprep
dim_vector dimensions

Protected Member Functions

void make_unique (void)

template<class T>
class Sparse< T >


Member Typedef Documentation

template<class T>
typedef T Sparse< T >::element_type

Constructor & Destructor Documentation

template<class T>
Sparse< T >::Sparse ( void   )  [inline]
template<class T>
Sparse< T >::Sparse ( octave_idx_type  n  )  [inline, explicit]
template<class T>
Sparse< T >::Sparse ( octave_idx_type  nr,
octave_idx_type  nc 
) [inline, explicit]
template<class T>
Sparse< T >::Sparse ( octave_idx_type  nr,
octave_idx_type  nc,
val 
) [explicit]
template<class T>
Sparse< T >::Sparse ( const dim_vector dv,
octave_idx_type  nz 
) [inline]
template<class T>
Sparse< T >::Sparse ( octave_idx_type  nr,
octave_idx_type  nc,
octave_idx_type  nz 
) [inline]
template<class T>
template<class U >
Sparse< T >::Sparse ( const Sparse< U > &  a  )  [inline]
template<class T>
Sparse< T >::Sparse ( const Sparse< T > &  a  )  [inline]
template<class T>
Sparse< T >::Sparse ( const dim_vector dv  ) 
template<class T>
Sparse< T >::Sparse ( const Sparse< T > &  a,
const dim_vector dv 
)
template<class T>
Sparse< T >::Sparse ( 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 
)
template<class T>
Sparse< T >::Sparse ( const Array< T > &  a  ) 
template<class T >
Sparse< T >::~Sparse ( void   )  [virtual]

Member Function Documentation

template<class T >
Array< T > Sparse< T >::array_value ( void   )  const
template<class T>
void Sparse< T >::assign ( const idx_vector i,
const idx_vector j,
const Sparse< T > &  rhs 
)
template<class T>
void Sparse< T >::assign ( const idx_vector i,
const Sparse< T > &  rhs 
)
template<class T>
size_t Sparse< T >::byte_size ( void   )  const [inline]
template<class T>
octave_idx_type Sparse< T >::capacity ( void   )  const [inline]
template<class T>
Sparse< T > Sparse< T >::cat ( int  dim,
octave_idx_type  n,
const Sparse< T > *  sparse_list 
) [static]
template<class T>
void Sparse< T >::change_capacity ( octave_idx_type  nz  )  [inline]
template<class T>
T& Sparse< T >::checkelem ( octave_idx_type  n  )  [inline]
template<class T>
T& Sparse< T >::checkelem ( octave_idx_type  i,
octave_idx_type  j 
) [inline]
template<class T>
T& Sparse< T >::checkelem ( const Array< octave_idx_type > &  ra_idx  )  [inline]
template<class T>
T Sparse< T >::checkelem ( octave_idx_type  n  )  const [inline]
template<class T>
T Sparse< T >::checkelem ( octave_idx_type  i,
octave_idx_type  j 
) const [inline]
template<class T>
T Sparse< T >::checkelem ( const Array< octave_idx_type > &  ra_idx  )  const [inline]
template<class T>
octave_idx_type* Sparse< T >::cidx ( void   )  [inline]
template<class T>
octave_idx_type& Sparse< T >::cidx ( octave_idx_type  i  )  [inline]
template<class T>
octave_idx_type Sparse< T >::cidx ( octave_idx_type  i  )  const [inline]
template<class T>
octave_idx_type* Sparse< T >::cidx ( void   )  const [inline]
template<class T>
octave_idx_type Sparse< T >::cols ( void   )  const [inline]
template<class T>
octave_idx_type Sparse< T >::columns ( void   )  const [inline]
template<class T >
octave_idx_type Sparse< T >::compute_index ( const Array< octave_idx_type > &  ra_idx  )  const
template<class T>
T& Sparse< T >::data ( octave_idx_type  i  )  [inline]
template<class T>
T Sparse< T >::data ( octave_idx_type  i  )  const [inline]
template<class T>
T* Sparse< T >::data ( void   )  const [inline]
template<class T>
T* Sparse< T >::data ( void   )  [inline]
template<class T >
void Sparse< T >::delete_elements ( const idx_vector i  ) 
template<class T >
void Sparse< T >::delete_elements ( int  dim,
const idx_vector i 
)
template<class T >
void Sparse< T >::delete_elements ( const idx_vector i,
const idx_vector j 
)
template<class T >
Sparse< T > Sparse< T >::diag ( octave_idx_type  k = 0  )  const
template<class T>
octave_idx_type Sparse< T >::dim1 ( void   )  const [inline]
template<class T>
octave_idx_type Sparse< T >::dim2 ( void   )  const [inline]
template<class T>
dim_vector Sparse< T >::dims ( void   )  const [inline]
template<class T>
T& Sparse< T >::elem ( octave_idx_type  n  )  [inline]
template<class T>
T& Sparse< T >::elem ( octave_idx_type  i,
octave_idx_type  j 
) [inline]
template<class T>
T& Sparse< T >::elem ( const Array< octave_idx_type > &  ra_idx  )  [inline]
template<class T>
T Sparse< T >::elem ( octave_idx_type  n  )  const [inline]
template<class T>
T Sparse< T >::elem ( octave_idx_type  i,
octave_idx_type  j 
) const [inline]
template<class T>
T Sparse< T >::elem ( const Array< octave_idx_type > &  ra_idx  )  const [inline]
template<class T>
octave_idx_type Sparse< T >::get_col_index ( octave_idx_type  k  )  [inline]
template<class T>
octave_idx_type Sparse< T >::get_row_index ( octave_idx_type  k  )  [inline]
template<class T >
Sparse< T > Sparse< T >::index ( const idx_vector i,
const idx_vector j,
bool  resize_ok = false 
) const

Reimplemented in SparseBoolMatrix.

template<class T >
Sparse< T > Sparse< T >::index ( const idx_vector i,
bool  resize_ok = false 
) const

Reimplemented in SparseBoolMatrix.

template<class T>
bool Sparse< T >::indices_ok ( void   )  const [inline]
template<class T>
Sparse< T > & Sparse< T >::insert ( const Sparse< T > &  a,
octave_idx_type  r,
octave_idx_type  c 
)
template<class T>
Sparse< T > & Sparse< T >::insert ( const Sparse< T > &  a,
const Array< octave_idx_type > &  idx 
)
template<class T>
Sparse<T> Sparse< T >::ipermute ( const Array< octave_idx_type > &  vec  )  const [inline]
template<class T>
bool Sparse< T >::is_empty ( void   )  const [inline]
template<class T>
bool Sparse< T >::is_square ( void   )  const [inline]
template<class T>
octave_idx_type Sparse< T >::length ( void   )  const [inline]
template<class T>
void Sparse< T >::make_unique ( void   )  [inline, protected]
template<class T>
template<class U , class F >
Sparse<U> Sparse< T >::map ( fcn  )  const [inline]
template<class T>
template<class U >
Sparse<U> Sparse< T >::map ( U(&)(T)  fcn  )  const [inline]
template<class T>
template<class U >
Sparse<U> Sparse< T >::map ( U(&)(const T &)  fcn  )  const [inline]
template<class T>
Sparse<T> Sparse< T >::maybe_compress ( bool  remove_zeros = false  )  [inline]
template<class T>
void* Sparse< T >::mex_get_data ( void   )  const [inline]
template<class T>
octave_idx_type* Sparse< T >::mex_get_ir ( void   )  const [inline]
template<class T>
octave_idx_type* Sparse< T >::mex_get_jc ( void   )  const [inline]
template<class T>
octave_idx_type Sparse< T >::ndims ( void   )  const [inline]
template<class T>
octave_idx_type Sparse< T >::nelem ( void   )  const [inline]
template<class T>
octave_idx_type Sparse< T >::nnz ( void   )  const [inline]
template<class T>
octave_idx_type Sparse< T >::numel ( void   )  const [inline]
template<class T>
octave_idx_type Sparse< T >::nzmax ( void   )  const [inline]
template<class T>
T Sparse< T >::operator() ( octave_idx_type  n  )  const [inline]
template<class T>
T Sparse< T >::operator() ( const Array< octave_idx_type > &  ra_idx  )  const [inline]
template<class T>
T& Sparse< T >::operator() ( octave_idx_type  n  )  [inline]
template<class T>
T& Sparse< T >::operator() ( octave_idx_type  i,
octave_idx_type  j 
) [inline]
template<class T>
T& Sparse< T >::operator() ( const Array< octave_idx_type > &  ra_idx  )  [inline]
template<class T>
T Sparse< T >::operator() ( octave_idx_type  i,
octave_idx_type  j 
) const [inline]
template<class T>
Sparse< T > & Sparse< T >::operator= ( const Sparse< T > &  a  ) 
template<class T >
Sparse< T > Sparse< T >::permute ( const Array< octave_idx_type > &  vec,
bool  inv = false 
) const
template<class T >
void Sparse< T >::print_info ( std::ostream &  os,
const std::string &  prefix 
) const
template<class T >
T & Sparse< T >::range_error ( const char *  fcn,
const Array< octave_idx_type > &  ra_idx 
)
template<class T >
T & Sparse< T >::range_error ( const char *  fcn,
octave_idx_type  i,
octave_idx_type  j 
)
template<class T >
T Sparse< T >::range_error ( const char *  fcn,
octave_idx_type  i,
octave_idx_type  j 
) const
template<class T >
T Sparse< T >::range_error ( const char *  fcn,
octave_idx_type  n 
) const
template<class T >
T & Sparse< T >::range_error ( const char *  fcn,
octave_idx_type  n 
)
template<class T >
T Sparse< T >::range_error ( const char *  fcn,
const Array< octave_idx_type > &  ra_idx 
) const
template<class T >
Sparse< T > Sparse< T >::reshape ( const dim_vector new_dims  )  const
template<class T >
void Sparse< T >::resize ( octave_idx_type  r,
octave_idx_type  c 
)
template<class T >
void Sparse< T >::resize ( const dim_vector dv  ) 
template<class T >
void Sparse< T >::resize1 ( octave_idx_type  n  ) 
template<class T>
octave_idx_type* Sparse< T >::ridx ( void   )  [inline]
template<class T>
octave_idx_type Sparse< T >::ridx ( octave_idx_type  i  )  const [inline]
template<class T>
octave_idx_type& Sparse< T >::ridx ( octave_idx_type  i  )  [inline]
template<class T>
octave_idx_type* Sparse< T >::ridx ( void   )  const [inline]
template<class T>
octave_idx_type Sparse< T >::rows ( void   )  const [inline]
template<class T >
Sparse< T > Sparse< T >::sort ( Array< octave_idx_type > &  sidx,
octave_idx_type  dim = 0,
sortmode  mode = ASCENDING 
) const
template<class T >
Sparse< T > Sparse< T >::sort ( octave_idx_type  dim = 0,
sortmode  mode = ASCENDING 
) const
template<class T>
Sparse<T> Sparse< T >::squeeze ( void   )  const [inline]
template<class T >
Sparse< T > Sparse< T >::transpose ( void   )  const
template<class T>
octave_idx_type& Sparse< T >::xcidx ( octave_idx_type  i  )  [inline]
template<class T>
octave_idx_type* Sparse< T >::xcidx ( void   )  [inline]
template<class T>
T& Sparse< T >::xdata ( octave_idx_type  i  )  [inline]
template<class T>
T* Sparse< T >::xdata ( void   )  [inline]
template<class T>
T Sparse< T >::xelem ( const Array< octave_idx_type > &  ra_idx  )  const [inline]
template<class T>
T Sparse< T >::xelem ( octave_idx_type  i,
octave_idx_type  j 
) const [inline]
template<class T>
T& Sparse< T >::xelem ( octave_idx_type  i,
octave_idx_type  j 
) [inline]
template<class T>
T Sparse< T >::xelem ( octave_idx_type  n  )  const [inline]
template<class T>
T& Sparse< T >::xelem ( const Array< octave_idx_type > &  ra_idx  )  [inline]
template<class T>
T& Sparse< T >::xelem ( octave_idx_type  n  )  [inline]
template<class T>
octave_idx_type* Sparse< T >::xridx ( void   )  [inline]
template<class T>
octave_idx_type& Sparse< T >::xridx ( octave_idx_type  i  )  [inline]

Member Data Documentation

template<class T>
dim_vector Sparse< T >::dimensions
template<class T>
Sparse<T>::SparseRep* Sparse< T >::rep

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines