ergo
|
#include <Vector.h>
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) |
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 |
Vector class.
This class is used to obtain the hierarchic vector data structure.
typedef Telement mat::Vector::ElementType |
mat::Vector::Vector | ( | ) | [inline] |
void mat::Vector::addFromFull | ( | std::vector< Treal > const & | fullVector | ) |
Referenced by mat::Vector< Treal >::assignFromFull().
void mat::Vector::allocate | ( | ) | [inline] |
References mat::VectorHierarchicBase< Treal, Telement >::is_empty(), mat::VectorHierarchicBase< Treal, Telement >::is_zero(), mat::VectorHierarchicBase< Treal, Telement >::elements, mat::VectorHierarchicBase< Treal, Telement >::n(), mat::VectorHierarchicBase< Treal, Telement >::rows, mat::SizesAndBlocks::getNBlocks(), mat::SizesAndBlocks::getSizesAndBlocksForLowerLevel(), and mat::VectorHierarchicBase< Treal, Telement >::resetRows().
Referenced by mat::Vector< Treal >::addFromFull(), mat::Vector< Treal >::readFromFile(), and mat::Vector< Treal >::random().
void mat::Vector::assignFromFull | ( | std::vector< Treal > const & | fullVector | ) |
void mat::Vector::axpy | ( | Treal const & | alpha, |
Vector< Treal, Telement > const & | x, | ||
Vector< Treal, Telement > & | y | ||
) | [static] |
References mat::axpy().
Referenced by mat::Vector< Treal >::axpy().
void mat::Vector::clear | ( | ) |
Referenced by mat::Vector< Treal >::operator=().
Treal mat::Vector::dot | ( | Vector< Treal, Telement > const & | x, |
Vector< Treal, Telement > const & | y | ||
) | [static] |
References mat::dot().
Referenced by eucl(), mat::Vector< Treal >::eucl(), and mat::Vector< Treal >::dot().
Treal mat::Vector::eucl | ( | ) | const [inline] |
References template_blas_sqrt(), and dot().
Referenced by randomNormalized(), and mat::Vector< Treal >::randomNormalized().
void mat::Vector::fullVector | ( | std::vector< Treal > & | fullVector | ) | const |
void mat::Vector::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] |
gemv: y = alpha * A * x + beta * y, or y = alpha * transpose(A) * x + beta * y
References MAT_OMP_INIT, mat::MatrixHierarchicBase::ncols(), mat::MatrixHierarchicBase::nrows(), MAT_OMP_START, mat::gemv(), MAT_OMP_END, and MAT_OMP_FINALIZE.
Referenced by mat::Vector< Treal >::gemv().
Vector< Treal, Telement > & mat::Vector::operator*= | ( | const Treal | alpha | ) |
Referenced by mat::Vector< Treal >::operator=().
Vector< Treal, Telement > & mat::Vector::operator= | ( | int const | k | ) |
void mat::Vector::random | ( | ) |
Referenced by randomNormalized(), and mat::Vector< Treal >::randomNormalized().
void mat::Vector::readFromFile | ( | std::ifstream & | file | ) |
void mat::Vector::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] |
symv: y = alpha * A * x + beta * y, where A is symmetric
References mat::MatrixHierarchicBase::nrows(), mat::MatrixHierarchicBase::ncols(), MAT_OMP_INIT, MAT_OMP_START, mat::symv(), MAT_OMP_END, mat::gemv(), and MAT_OMP_FINALIZE.
Referenced by mat::Vector< Treal >::symv().
void mat::Vector::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 mat::MatrixHierarchicBase::nrows(), mat::MatrixHierarchicBase::ncols(), mat::trmv(), and mat::gemv().
Referenced by mat::Vector< Treal >::trmv().
void mat::Vector::writeToFile | ( | std::ofstream & | file | ) | const |