ergo
mat::Vector< Treal > Class Template Reference

#include <Vector.h>

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

Public Types

typedef Treal 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 > & operator= (const Vector< Treal > &vec)
 
void clear ()
 Set vector to zero and delete all arrays.
 
void writeToFile (std::ofstream &file) const
 
void readFromFile (std::ifstream &file)
 
Vector< Treal > & operator= (int const k)
 
void randomNormalized ()
 
void random ()
 
Treal eucl () const
 
Vector< Treal > & operator*= (const Treal alpha)
 
 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, Treal > & operator= (const Vector< Treal, Treal > &vec)
 
Vector< Treal, Treal > & operator= (int const k)
 
void clear ()
 
void writeToFile (std::ofstream &file) const
 
void readFromFile (std::ifstream &file)
 
void randomNormalized ()
 
void random ()
 
Treal eucl () const
 
Vector< Treal, Treal > & operator*= (const Treal alpha)
 
- 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)
 
- Public Member Functions inherited from mat::VectorHierarchicBase< Treal, Telement >
const int & nScalars () const
 
const int & n () const
 
Telement & operator ()(int ind)
 
const Telement & operator ()(int ind) const
 
bool is_zero () const
 
void resetRows (SizesAndBlocks const &newRows)
 

Static Public Member Functions

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

Friends

class Matrix< Treal >
 

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 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, Treal >
SizesAndBlocks rows
 
Treal * elements
 
- Protected Attributes inherited from mat::VectorHierarchicBase< Treal, Telement >
SizesAndBlocks rows
 
Telement * elements
 

Member Typedef Documentation

◆ ElementType

typedef Treal mat::Vector< Treal, Treal >::ElementType

Constructor & Destructor Documentation

◆ Vector() [1/2]

◆ Vector() [2/2]

mat::Vector< Treal, Treal >::Vector ( )
inline

Member Function Documentation

◆ addFromFull() [1/2]

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

◆ addFromFull() [2/2]

◆ allocate() [1/2]

void mat::Vector< Treal, Treal >::allocate ( )
inline

◆ allocate() [2/2]

◆ assignFromFull() [1/2]

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

◆ assignFromFull() [2/2]

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

References addFromFull(), and fullVector().

◆ axpy() [1/2]

◆ axpy() [2/2]

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

◆ clear() [1/2]

void mat::Vector< Treal, Treal >::clear ( )

◆ clear() [2/2]

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

Set vector to zero and delete all arrays.

References mat::VectorHierarchicBase< Treal, Telement >::elements, and mat::freeElements().

Referenced by operator=().

◆ dot() [1/2]

◆ dot() [2/2]

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

◆ eucl() [1/2]

Treal mat::Vector< Treal, Treal >::eucl ( ) const
inline

◆ eucl() [2/2]

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

◆ fullVector() [1/2]

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

◆ fullVector() [2/2]

◆ gemv() [1/2]

◆ gemv() [2/2]

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

gemv: y = alpha * A * x + beta * y, or
y = alpha * transpose(A) * x + beta * y

◆ operator*=() [1/2]

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

◆ operator*=() [2/2]

◆ operator=() [1/4]

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

◆ operator=() [2/4]

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

◆ operator=() [3/4]

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

◆ operator=() [4/4]

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

References clear(), and Vector().

◆ random() [1/2]

void mat::Vector< Treal, Treal >::random ( )

◆ random() [2/2]

◆ randomNormalized() [1/2]

void mat::Vector< Treal, Treal >::randomNormalized ( )
inline

◆ randomNormalized() [2/2]

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

◆ readFromFile() [1/2]

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

◆ readFromFile() [2/2]

◆ symv() [1/2]

◆ symv() [2/2]

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

symv: y = alpha * A * x + beta * y, where A is symmetric

◆ trmv() [1/2]

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

◆ trmv() [2/2]

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

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

◆ writeToFile() [1/2]

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

◆ writeToFile() [2/2]

Friends And Related Symbol Documentation

◆ Matrix< Treal >

template<class Treal>
friend class Matrix< Treal >
friend

References A, and Vector().


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