KrisLibrary  1.0.0
Public Types | Public Member Functions | List of all members
Math::SparseVectorTemplate< T > Class Template Reference
Inheritance diagram for Math::SparseVectorTemplate< T >:
SparseArray< T >

Public Types

typedef SparseVectorTemplate< T > MyT
 
typedef SparseArray< T > BaseT
 
typedef BaseT::iterator iterator
 
typedef BaseT::const_iterator const_iterator
 
typedef VectorTemplate< T > VectorT
 
- Public Types inherited from SparseArray< T >
typedef std::map< int, T > Storage
 
typedef Storage::iterator iterator
 
typedef Storage::const_iterator const_iterator
 

Public Member Functions

 SparseVectorTemplate (size_t n)
 
 SparseVectorTemplate (const BaseT &v)
 
void print (std::ostream &) const
 
SparseVectorAccessor< T > operator() (int i)
 
SparseVectorAccessor< T > operator[] (int i)
 
operator() (int i) const
 
operator[] (int i) const
 
get (int i) const
 
void set (int i, const T &t)
 
void setZero ()
 
void set (const BaseT &v)
 
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 copy (const MyT &)
 
void copySubVector (int i, const MyT &)
 
void copySubVector (int i, const VectorT &, T zeroTol=0)
 
void swap (MyT &)
 
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 isEmpty () const
 
bool hasDims (size_t _n) const
 
minElement (int *index=NULL) const
 
maxElement (int *index=NULL) const
 
minAbsElement (int *index=NULL) const
 
maxAbsElement (int *index=NULL) const
 
template<>
Complex minElement (int *index) const
 
template<>
Complex maxElement (int *index) const
 
template<>
Complex minAbsElement (int *index) const
 
template<>
Complex maxAbsElement (int *index) const
 
- Public Member Functions inherited from SparseArray< T >
 SparseArray (size_t _n)
 
void resize (size_t _n)
 
void clear ()
 
bool empty () const
 
size_t size () const
 
size_t numEntries () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
iterator insert (int i, const T &t)
 
iterator push_back (int i, const T &t)
 
iterator find (int i)
 
const_iterator find (int i) const
 
bool erase (int i)
 
void erase (const iterator &it)
 
bool isValidIndex (int i) const
 
bool isValid () const
 
bool Read (File &f)
 
bool Write (File &f) const
 

Additional Inherited Members

- Public Attributes inherited from SparseArray< T >
Storage entries
 
size_t n
 

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