aimstil  5.0.5
til::SparseVector< T > Class Template Reference

A mathematical vector, using sparse storage policy. More...

#include <cathier/SparseVector.h>

Inheritance diagram for til::SparseVector< T >:
Collaboration diagram for til::SparseVector< T >:

Public Types

typedef sparse_vector< T > Base
 
- Public Types inherited from til::sparse_vector< T >
typedef sparse_vector< T > Self
 
typedef std::map< std::size_t, T > Map
 
typedef Map::mapped_type value_type
 
typedef T const_reference
 
typedef ValueProxy reference
 
typedef const T * const_pointer
 

Public Member Functions

 SparseVector ()
 Create a null vector of size 0. More...
 
 SparseVector (std::size_t d)
 Create a null vector of length d. More...
 
- Public Member Functions inherited from til::sparse_vector< T >
 sparse_vector ()
 Create a null vector of size 0. More...
 
 sparse_vector (std::size_t d)
 Create a null vector of length d. More...
 
ValueProxy operator[] (std::size_t i)
 Read-write access to i-th element. More...
 
operator[] (std::size_t i) const
 Get value of i-th element. More...
 
get (std::size_t i) const
 Get i-th value. More...
 
void set (std::size_t i, const T &value)
 Set n-th value. More...
 
MapgetMap ()
 Returns the internal data. More...
 
Map const & getMap () const
 
policy::SVBaseline_Value< T > baselinePolicy () const
 
policy::SVBaseline_Value< T > & baselinePolicy ()
 
std::size_t size () const
 Alike STL container's "size". More...
 
void clear ()
 Alike STL container's "clear". More...
 
bool empty () const
 Alike STL container's "empty". More...
 
void erase (const sparse_iterator &i)
 Alike STL container's "erase". More...
 
bool is_null () const
 
sparse_iterator sparse_begin ()
 
sparse_const_iterator sparse_begin () const
 
sparse_iterator sparse_end ()
 
sparse_const_iterator sparse_end () const
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
void operator+= (const sparse_vector< T > &a)
 
void operator+= (const T &value)
 
void operator-= (const sparse_vector< T > &a)
 
void operator-= (const T &value)
 
void operator*= (const sparse_vector< T > &a)
 
void operator*= (const T &value)
 
void operator/= (const sparse_vector< T > &a)
 

Detailed Description

template<typename T>
class til::SparseVector< T >

A mathematical vector, using sparse storage policy.

Definition at line 24 of file SparseVector.h.

Member Typedef Documentation

◆ Base

template<typename T>
typedef sparse_vector<T> til::SparseVector< T >::Base

Definition at line 28 of file SparseVector.h.

Constructor & Destructor Documentation

◆ SparseVector() [1/2]

template<typename T>
til::SparseVector< T >::SparseVector ( )
inline

Create a null vector of size 0.

Definition at line 33 of file SparseVector.h.

◆ SparseVector() [2/2]

template<typename T>
til::SparseVector< T >::SparseVector ( std::size_t  d)
inline

Create a null vector of length d.

Definition at line 35 of file SparseVector.h.


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