ug4
ug::SparseVector< T > Class Template Reference

#include <sparse_vector.h>

Classes

class  const_iterator
 
class  iterator
 

Public Types

typedef T value_type
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
bool has_connection (size_t c) const
 
size_t num_connections () const
 
T & operator() (size_t c)
 
const T & operator() (size_t c) const
 
void print () const
 
size_t size ()
 
 SparseVector (size_t s)
 

Private Types

typedef std::map< size_t, T > container
 

Private Attributes

container data
 
size_t m_size
 

Member Typedef Documentation

◆ container

template<typename T >
typedef std::map<size_t, T> ug::SparseVector< T >::container
private

◆ value_type

template<typename T >
typedef T ug::SparseVector< T >::value_type

Constructor & Destructor Documentation

◆ SparseVector()

template<typename T >
ug::SparseVector< T >::SparseVector ( size_t  s)
inline

References s.

Member Function Documentation

◆ begin()

template<typename T >
const_iterator ug::SparseVector< T >::begin ( ) const
inline

◆ end()

template<typename T >
const_iterator ug::SparseVector< T >::end ( ) const
inline

◆ has_connection()

template<typename T >
bool ug::SparseVector< T >::has_connection ( size_t  c) const
inline

◆ num_connections()

template<typename T >
size_t ug::SparseVector< T >::num_connections ( ) const
inline

◆ operator()() [1/2]

template<typename T >
T& ug::SparseVector< T >::operator() ( size_t  c)
inline

◆ operator()() [2/2]

template<typename T >
const T& ug::SparseVector< T >::operator() ( size_t  c) const
inline

◆ print()

template<typename T >
void ug::SparseVector< T >::print ( ) const
inline

◆ size()

template<typename T >
size_t ug::SparseVector< T >::size ( )
inline

Member Data Documentation

◆ data

◆ m_size

template<typename T >
size_t ug::SparseVector< T >::m_size
private

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