ergo
|
#include <Vector.h>
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) |
![]() | |
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) |
![]() | |
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 | |
![]() | |
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 () |
![]() | |
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 () |
![]() | |
SizesAndBlocks | rows |
Treal * | elements |
![]() | |
SizesAndBlocks | rows |
Telement * | elements |
typedef Treal mat::Vector< Treal, Treal >::ElementType |
|
inline |
References mat::VectorHierarchicBase< Treal, Telement >::VectorHierarchicBase().
Referenced by axpy(), dot(), gemv(), Matrix< Treal >, operator*=(), operator=(), operator=(), symv(), and trmv().
|
inline |
void mat::Vector< Treal, Treal >::addFromFull | ( | std::vector< Treal > const & | fullVector | ) |
void mat::Vector< Treal >::addFromFull | ( | std::vector< Treal > const & | fullVector | ) |
|
inline |
|
inline |
References mat::allocateElements(), mat::VectorHierarchicBase< Treal, Telement >::elements, mat::VectorHierarchicBase< Treal, Treal >::is_empty(), mat::VectorHierarchicBase< Treal, Treal >::is_zero(), and mat::VectorHierarchicBase< Treal, Treal >::n().
Referenced by addFromFull(), random(), and readFromFile().
void mat::Vector< Treal, Treal >::assignFromFull | ( | std::vector< Treal > const & | fullVector | ) |
void mat::Vector< Treal >::assignFromFull | ( | std::vector< Treal > const & | fullVector | ) |
References addFromFull(), and fullVector().
|
static |
|
static |
void mat::Vector< Treal, Treal >::clear | ( | ) |
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=().
|
static |
|
static |
|
inline |
|
inline |
References mat::Vector< Treal, Telement >::dot(), and template_blas_sqrt().
void mat::Vector< Treal, Treal >::fullVector | ( | std::vector< Treal > & | fullVector | ) | const |
void mat::Vector< Treal >::fullVector | ( | std::vector< Treal > & | fullVector | ) | const |
|
static |
gemv: y = alpha * A * x + beta * y, or
y = alpha * transpose(A) * x + beta * y
References A, mat::Vector< Treal, Telement >::allocate(), mat::VectorHierarchicBase< Treal, Telement >::elements, mat::gemv(), mat::VectorHierarchicBase< Treal, Telement >::is_empty(), mat::VectorHierarchicBase< Treal, Telement >::is_zero(), mat::Matrix< Treal >::ONE, mat::VectorHierarchicBase< Treal, Telement >::n(), mat::VectorHierarchicBase< Treal, Telement >::resetRows(), mat::VectorHierarchicBase< Treal, Telement >::rows, and Vector().
|
static |
gemv: y = alpha * A * x + beta * y, or
y = alpha * transpose(A) * x + beta * y
Vector< Treal, Treal > & mat::Vector< Treal, Treal >::operator*= | ( | const Treal | alpha | ) |
Vector< Treal > & mat::Vector< Treal >::operator*= | ( | const Treal | alpha | ) |
|
inline |
References mat::VectorHierarchicBase< Treal, Telement >::operator=(), and Vector().
|
inline |
Vector< Treal, Treal > & mat::Vector< Treal, Treal >::operator= | ( | int const | k | ) |
Vector< Treal > & mat::Vector< Treal >::operator= | ( | int const | k | ) |
void mat::Vector< Treal, Treal >::random | ( | ) |
void mat::Vector< Treal >::random | ( | ) |
|
inline |
|
inline |
void mat::Vector< Treal, Treal >::readFromFile | ( | std::ifstream & | file | ) |
void mat::Vector< Treal >::readFromFile | ( | std::ifstream & | file | ) |
|
static |
symv: y = alpha * A * x + beta * y, where A is symmetric
References A, mat::Vector< Treal, Telement >::allocate(), mat::VectorHierarchicBase< Treal, Telement >::elements, mat::VectorHierarchicBase< Treal, Telement >::is_empty(), mat::VectorHierarchicBase< Treal, Telement >::is_zero(), mat::Matrix< Treal >::ONE, mat::VectorHierarchicBase< Treal, Telement >::n(), mat::VectorHierarchicBase< Treal, Telement >::resetRows(), mat::VectorHierarchicBase< Treal, Telement >::rows, mat::symv(), and Vector().
|
static |
symv: y = alpha * A * x + beta * y, where A is symmetric
|
static |
trmv: x = A * x, or x = transpose(A) * x, where A is triangular
References A, mat::VectorHierarchicBase< Treal, Telement >::elements, mat::VectorHierarchicBase< Treal, Telement >::is_zero(), mat::Matrix< Treal >::ONE, mat::VectorHierarchicBase< Treal, Telement >::n(), mat::trmv(), and Vector().
|
static |
trmv: x = A * x, or x = transpose(A) * x, where A is triangular
void mat::Vector< Treal, Treal >::writeToFile | ( | std::ofstream & | file | ) | const |
void mat::Vector< Treal >::writeToFile | ( | std::ofstream & | file | ) | const |