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