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

Vector class. More...

#include <Vector.h>

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

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)
 
- Public Member Functions inherited from mat::VectorHierarchicBase< Treal, Telement >
const intnScalars () const
 
const intn () const
 
Telementoperator ()(int ind)
 
const Telementoperator ()(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, Telement >
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, Telement > &vec)
 
VectorHierarchicBase< Treal, Telement > & operator= (const VectorHierarchicBase< Treal, Telement > &vec)
 
virtual ~VectorHierarchicBase ()
 
- Protected Attributes inherited from mat::VectorHierarchicBase< Treal, Telement >
SizesAndBlocks rows
 
Telementelements
 

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>
typedef 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()

◆ clear()

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

References mat::freeElements().

◆ dot()

◆ eucl()

◆ fullVector()

◆ gemv()

◆ operator*=()

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ random()

◆ randomNormalized()

◆ readFromFile()

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

◆ symv()

◆ trmv()

template<class Treal , class Telement >
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::getMachineEpsilon(), 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: