ergo
mat::Vector< Treal, Telement > Class Template Reference

Vector class. More...

#include <Vector.h>

Inheritance diagram for mat::Vector< Treal, Telement >:
mat::VectorHierarchicBase< Treal, Treal >

Public Types

typedef Telement ElementType
 

Public Member Functions

 Vector ()
 
void allocate ()
 
void assignFromFull (std::vector< Treal > const &fullVector)
 
void addFromFull (std::vector< Treal > const &fullVector)
 
void fullVector (std::vector< Treal > &fullVector) const
 
Vector< Treal, Telement > & operator= (const Vector< Treal, Telement > &vec)
 
void clear ()
 
void writeToFile (std::ofstream &file) const
 
void readFromFile (std::ifstream &file)
 
Vector< Treal, Telement > & operator= (int const k)
 
void randomNormalized ()
 
void random ()
 
Treal eucl () const
 
Vector< Treal, Telement > & operator*= (const Treal alpha)
 
template<class Treal >
void gemv (bool const tA, Treal const alpha, Matrix< Treal > const &A, Vector< Treal > const &x, Treal const beta, Vector< Treal > &y)
 gemv: y = alpha * A * x + beta * y, or
y = alpha * transpose(A) * x + beta * y
 
template<class Treal >
void symv (char const uplo, Treal const alpha, Matrix< Treal > const &A, Vector< Treal > const &x, Treal const beta, Vector< Treal > &y)
 symv: y = alpha * A * x + beta * y, where A is symmetric
 
- Public Member Functions inherited from mat::VectorHierarchicBase< Treal, Treal >
const int & nScalars () const
 
const int & n () const
 
Treal & operator ()(int ind)
 
const Treal & operator ()(int ind) const
 
bool is_zero () const
 
void resetRows (SizesAndBlocks const &newRows)
 

Static Public Member Functions

static Treal dot (Vector< Treal, Telement > const &x, Vector< Treal, Telement > const &y)
 
static void axpy (Treal const &alpha, Vector< Treal, Telement > const &x, Vector< Treal, Telement > &y)
 
template<typename TmatrixElement >
static void gemv (bool const tA, Treal const alpha, Matrix< Treal, TmatrixElement > const &A, Vector< Treal, Telement > const &x, Treal const beta, Vector< Treal, Telement > &y)
 gemv: y = alpha * A * x + beta * y, or
y = alpha * transpose(A) * x + beta * y
 
template<typename TmatrixElement >
static void symv (char const uplo, Treal const alpha, Matrix< Treal, TmatrixElement > const &A, Vector< Treal, Telement > const &x, Treal const beta, Vector< Treal, Telement > &y)
 symv: y = alpha * A * x + beta * y, where A is symmetric
 
template<typename TmatrixElement >
static void trmv (char const uplo, const bool tA, Matrix< Treal, TmatrixElement > const &A, Vector< Treal, Telement > &x)
 trmv: x = A * x, or x = transpose(A) * x, where A is triangular
 

Additional Inherited Members

- Protected Member Functions inherited from mat::VectorHierarchicBase< Treal, Treal >
bool is_empty () const
 Check if vector is empty Empty is different from zero, a zero matrix contains information about blocksizes etc.
 
 VectorHierarchicBase ()
 
 VectorHierarchicBase (SizesAndBlocks const &rowsInp)
 
 VectorHierarchicBase (const VectorHierarchicBase< Treal, Treal > &vec)
 
VectorHierarchicBase< Treal, Treal > & operator= (const VectorHierarchicBase< Treal, Treal > &vec)
 
virtual ~VectorHierarchicBase ()
 
- Protected Attributes inherited from mat::VectorHierarchicBase< Treal, Treal >
SizesAndBlocks rows
 
Treal * elements
 

Detailed Description

template<class Treal, class Telement = Treal>
class mat::Vector< Treal, Telement >

Vector class.

This class is used to obtain the hierarchic vector data structure.

See also
VectorHierarchicBase
Permutation

Member Typedef Documentation

◆ ElementType

template<class Treal , class Telement = Treal>
Telement mat::Vector< Treal, Telement >::ElementType

Constructor & Destructor Documentation

◆ Vector()

template<class Treal , class Telement = Treal>
mat::Vector< Treal, Telement >::Vector ( )
inline

Member Function Documentation

◆ addFromFull()

template<class Treal , class Telement >
void mat::Vector< Treal, Telement >::addFromFull ( std::vector< Treal > const & fullVector)

◆ allocate()

◆ assignFromFull()

template<class Treal , class Telement >
void mat::Vector< Treal, Telement >::assignFromFull ( std::vector< Treal > const & fullVector)

◆ axpy()

template<class Treal , class Telement >
void mat::Vector< Treal, Telement >::axpy ( Treal const & alpha,
Vector< Treal, Telement > const & x,
Vector< Treal, Telement > & y )
static

◆ clear()

template<class Treal , class Telement >
void mat::Vector< Treal, Telement >::clear ( )

References mat::freeElements().

◆ dot()

template<class Treal , class Telement >
Treal mat::Vector< Treal, Telement >::dot ( Vector< Treal, Telement > const & x,
Vector< Treal, Telement > const & y )
static

◆ eucl()

template<class Treal , class Telement = Treal>
Treal mat::Vector< Treal, Telement >::eucl ( ) const
inline

◆ fullVector()

template<class Treal , class Telement >
void mat::Vector< Treal, Telement >::fullVector ( std::vector< Treal > & fullVector) const

◆ gemv() [1/2]

template<class Treal , class Telement = Treal>
template<class Treal >
void mat::Vector< Treal, Telement >::gemv ( bool const tA,
Treal const alpha,
Matrix< Treal > const & A,
Vector< Treal > const & x,
Treal const beta,
Vector< Treal > & y )

◆ gemv() [2/2]

template<class Treal , class Telement >
template<typename TmatrixElement >
void mat::Vector< Treal, Telement >::gemv ( bool const tA,
Treal const alpha,
Matrix< Treal, TmatrixElement > const & A,
Vector< Treal, Telement > const & x,
Treal const beta,
Vector< Treal, Telement > & y )
static

◆ operator*=()

template<class Treal , class Telement >
Vector< Treal, Telement > & mat::Vector< Treal, Telement >::operator*= ( const Treal alpha)

◆ operator=() [1/2]

template<class Treal , class Telement = Treal>
Vector< Treal, Telement > & mat::Vector< Treal, Telement >::operator= ( const Vector< Treal, Telement > & vec)
inline

◆ operator=() [2/2]

template<class Treal , class Telement >
Vector< Treal, Telement > & mat::Vector< Treal, Telement >::operator= ( int const k)

◆ random()

template<class Treal , class Telement >
void mat::Vector< Treal, Telement >::random ( )

◆ randomNormalized()

template<class Treal , class Telement = Treal>
void mat::Vector< Treal, Telement >::randomNormalized ( )
inline

◆ readFromFile()

template<class Treal , class Telement >
void mat::Vector< Treal, Telement >::readFromFile ( std::ifstream & file)

◆ symv() [1/2]

template<class Treal , class Telement = Treal>
template<class Treal >
void mat::Vector< Treal, Telement >::symv ( char const uplo,
Treal const alpha,
Matrix< Treal > const & A,
Vector< Treal > const & x,
Treal const beta,
Vector< Treal > & y )

◆ symv() [2/2]

template<class Treal , class Telement >
template<typename TmatrixElement >
void mat::Vector< Treal, Telement >::symv ( char const uplo,
Treal const alpha,
Matrix< Treal, TmatrixElement > const & A,
Vector< Treal, Telement > const & x,
Treal const beta,
Vector< Treal, Telement > & y )
static

◆ trmv()

template<class Treal , class Telement >
template<typename TmatrixElement >
void mat::Vector< Treal, Telement >::trmv ( char const uplo,
const bool tA,
Matrix< Treal, TmatrixElement > const & A,
Vector< Treal, Telement > & x )
static

trmv: x = A * x, or x = transpose(A) * x, where A is triangular

References A, mat::VectorHierarchicBase< Treal, Telement >::is_zero(), and mat::VectorHierarchicBase< Treal, Telement >::n().

◆ writeToFile()

template<class Treal , class Telement >
void mat::Vector< Treal, Telement >::writeToFile ( std::ofstream & file) const

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