ViennaCL - The Vienna Computing Library  1.5.2
Public Types | Public Member Functions
amg_sparsevector< ScalarType > Class Template Reference

A class for the sparse vector type. More...

#include <amg_base.hpp>

Public Types

typedef ScalarType value_type
 
typedef
amg_sparsevector_iterator
< InternalType > 
iterator
 
typedef
InternalType::const_iterator 
const_iterator
 

Public Member Functions

 amg_sparsevector (unsigned int size=0)
 The constructor. More...
 
void resize (unsigned int size)
 
unsigned int size () const
 
unsigned int internal_size () const
 
void clear ()
 
void remove (unsigned int i)
 
void add (unsigned int i, ScalarType s)
 
template<typename IteratorType >
void addscalar (IteratorType &iter, unsigned int i, unsigned int, ScalarType s)
 
template<typename IteratorType >
void removescalar (IteratorType &iter, unsigned int)
 
NonzeroScalarType operator[] (unsigned int i)
 
ScalarType operator[] (unsigned int i) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
bool isnonzero (unsigned int i) const
 
 operator boost::numeric::ublas::vector< ScalarType > (void)
 

Detailed Description

template<typename ScalarType>
class viennacl::linalg::detail::amg::amg_sparsevector< ScalarType >

A class for the sparse vector type.

Member Typedef Documentation

typedef InternalType::const_iterator const_iterator
typedef amg_sparsevector_iterator<InternalType> iterator
typedef ScalarType value_type

Constructor & Destructor Documentation

amg_sparsevector ( unsigned int  size = 0)
inline

The constructor.

Parameters
sizeSize of the vector

Member Function Documentation

void add ( unsigned int  i,
ScalarType  s 
)
inline
void addscalar ( IteratorType &  iter,
unsigned int  i,
unsigned  int,
ScalarType  s 
)
inline
iterator begin ( )
inline
const_iterator begin ( ) const
inline
void clear ( )
inline
iterator end ( )
inline
const_iterator end ( ) const
inline
unsigned int internal_size ( ) const
inline
bool isnonzero ( unsigned int  i) const
inline
operator boost::numeric::ublas::vector< ScalarType > ( void  )
inline
NonzeroScalarType operator[] ( unsigned int  i)
inline
ScalarType operator[] ( unsigned int  i) const
inline
void remove ( unsigned int  i)
inline
void removescalar ( IteratorType &  iter,
unsigned  int 
)
inline
void resize ( unsigned int  size)
inline
unsigned int size ( ) const
inline

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