KrisLibrary  1.0.0
Public Types | Public Member Functions | Public Attributes | List of all members
Math::SparseVectorCompressed< T > Class Template Reference

Public Types

typedef SparseVectorCompressed< T > MyT
 
typedef VectorTemplate< T > VectorT
 

Public Member Functions

 SparseVectorCompressed (int n, int num_entries)
 
 SparseVectorCompressed (const MyT &)
 
void init (int n, int num_entries)
 
void resize (int n, int num_entries)
 
void makeSimilar (const MyT &)
 
void cleanup ()
 
bool Read (File &)
 
bool Write (File &) const
 
void print (std::ostream &) const
 
const MyToperator= (const MyT &)
 
operator() (int i) const
 
void setZero ()
 
void set (const MyT &)
 
void set (const VectorT &, T zeroTol=Zero)
 
void set (const T *, int n, T zeroTol=Zero)
 
void get (T *) const
 
void get (VectorT &) const
 
void inplaceNegative ()
 
void inplaceMul (T s)
 
void inplaceDiv (T s)
 
void add (const MyT &, const MyT &)
 
void sub (const MyT &, const MyT &)
 
void mul (const MyT &, T s)
 
void div (const MyT &, T s)
 
dot (const VectorT &) const
 
dot (const MyT &) const
 
norm () const
 
normSquared () const
 
distance (const MyT &) const
 
distanceSquared (const MyT &) const
 
bool isValid () const
 
bool isEmpty () const
 
bool hasDims (int _n) const
 
bool isValidIndex (int i) const
 
minElement (int *index=NULL) const
 
maxElement (int *index=NULL) const
 
minAbsElement (int *index=NULL) const
 
maxAbsElement (int *index=NULL) const
 

Public Attributes

int * indices
 
T * vals
 
int num_entries
 
int n
 

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