Vector and matrix classes. More...
Classes | |
class | BMatrix< T_ > |
To handle band matrices. More... | |
class | DMatrix< T_ > |
To handle dense matrices. More... | |
class | DSMatrix< T_ > |
To handle symmetric dense matrices. More... | |
class | LocalMatrix< T_, NR_, NC_ > |
Handles small size matrices like element matrices, with a priori known size. More... | |
class | LocalVect< T_, N_ > |
Handles small size vectors like element vectors. More... | |
class | SkMatrix< T_ > |
To handle square matrices in skyline storage format. More... | |
class | SkSMatrix< T_ > |
To handle symmetric matrices in skyline storage format. More... | |
class | SpMatrix< T_ > |
To handle matrices in sparse storage format. More... | |
class | TrMatrix< T_ > |
To handle tridiagonal matrices. More... | |
class | Vect< T_ > |
To handle general purpose vectors. More... | |
Functions | |
template<class T_ > | |
Vect< T_ > | operator* (const BMatrix< T_ > &A, const Vect< T_ > &b) |
Operator * (Multiply vector by matrix and return resulting vector. More... | |
template<class T_ > | |
BMatrix< T_ > | operator* (T_ a, const BMatrix< T_ > &A) |
Operator * (Premultiplication of matrix by constant) More... | |
template<class T_ > | |
ostream & | operator<< (ostream &s, const BMatrix< T_ > &a) |
Output matrix in output stream. | |
template<class T_ > | |
Vect< T_ > | operator* (const DMatrix< T_ > &A, const Vect< T_ > &b) |
Operator * (Multiply vector by matrix and return resulting vector. More... | |
template<class T_ > | |
ostream & | operator<< (ostream &s, const DMatrix< T_ > &a) |
Output matrix in output stream. | |
template<class T_ > | |
Vect< T_ > | operator* (const DSMatrix< T_ > &A, const Vect< T_ > &b) |
Operator * (Multiply vector by matrix and return resulting vector. More... | |
template<class T_ > | |
ostream & | operator<< (ostream &s, const DSMatrix< T_ > &a) |
Output matrix in output stream. | |
template<class T_ , size_t NR_, size_t NC_> | |
LocalMatrix< T_, NR_, NC_ > | operator* (T_ a, const LocalMatrix< T_, NR_, NC_ > &x) |
Operator * (Multiply matrix x by scalar a ) More... | |
template<class T_ , size_t NR_, size_t NC_> | |
LocalVect< T_, NR_ > | operator* (const LocalMatrix< T_, NR_, NC_ > &A, const LocalVect< T_, NC_ > &x) |
Operator * (Multiply matrix A by vector x ) More... | |
template<class T_ , size_t NR_, size_t NC_> | |
LocalMatrix< T_, NR_, NC_ > | operator/ (T_ a, const LocalMatrix< T_, NR_, NC_ > &x) |
Operator / (Divide matrix x by scalar a ) More... | |
template<class T_ , size_t NR_, size_t NC_> | |
LocalMatrix< T_, NR_, NC_ > | operator+ (const LocalMatrix< T_, NR_, NC_ > &x, const LocalMatrix< T_, NR_, NC_ > &y) |
Operator + (Add matrix x to y) More... | |
template<class T_ , size_t NR_, size_t NC_> | |
LocalMatrix< T_, NR_, NC_ > | operator- (const LocalMatrix< T_, NR_, NC_ > &x, const LocalMatrix< T_, NR_, NC_ > &y) |
Operator - (Subtract matrix y from x) More... | |
template<class T_ , size_t NR_, size_t NC_> | |
ostream & | operator<< (ostream &s, const LocalMatrix< T_, NR_, NC_ > &A) |
Output vector in output stream. | |
template<class T_ , size_t N_> | |
LocalVect< T_, N_ > | operator+ (const LocalVect< T_, N_ > &x, const LocalVect< T_, N_ > &y) |
Operator + (Add two vectors) More... | |
template<class T_ , size_t N_> | |
LocalVect< T_, N_ > | operator- (const LocalVect< T_, N_ > &x, const LocalVect< T_, N_ > &y) |
Operator - (Subtract two vectors) More... | |
template<class T_ , size_t N_> | |
LocalVect< T_, N_ > | operator* (T_ a, const LocalVect< T_, N_ > &x) |
Operator * (Premultiplication of vector by constant) More... | |
template<class T_ , size_t N_> | |
LocalVect< T_, N_ > | operator/ (T_ a, const LocalVect< T_, N_ > &x) |
Operator / (Division of vector by constant) More... | |
template<class T_ , size_t N_> | |
real_t | Dot (const LocalVect< T_, N_ > &a, const LocalVect< T_, N_ > &b) |
Calculate dot product of 2 vectors (instances of class LocalVect) More... | |
template<class T_ , size_t N_> | |
void | Scale (T_ a, const LocalVect< T_, N_ > &x, LocalVect< T_, N_ > &y) |
Multiply vector x by constant a and store result in y . | |
template<class T_ , size_t N_> | |
void | Scale (T_ a, LocalVect< T_, N_ > &x) |
Multiply vector x by constant a and store result in x . | |
template<class T_ , size_t N_> | |
void | Axpy (T_ a, const LocalVect< T_, N_ > &x, LocalVect< T_, N_ > &y) |
Add a*x to vector y . | |
template<class T_ , size_t N_> | |
void | Copy (const LocalVect< T_, N_ > &x, LocalVect< T_, N_ > &y) |
Copy vector x into vector y. | |
template<class T_ , size_t N_> | |
ostream & | operator<< (ostream &s, const LocalVect< T_, N_ > &v) |
Output vector in output stream. | |
template<class T_ > | |
Vect< T_ > | operator* (const SkMatrix< T_ > &A, const Vect< T_ > &b) |
Operator * (Multiply vector by matrix and return resulting vector. More... | |
template<class T_ > | |
ostream & | operator<< (ostream &s, const SkMatrix< T_ > &a) |
Output matrix in output stream. More... | |
template<class T_ > | |
Vect< T_ > | operator* (const SkSMatrix< T_ > &A, const Vect< T_ > &b) |
Operator * (Multiply vector by matrix and return resulting vector. More... | |
template<class T_ > | |
ostream & | operator<< (ostream &s, const SkSMatrix< T_ > &a) |
Output matrix in output stream. More... | |
template<class T_ > | |
Vect< T_ > | operator* (const SpMatrix< T_ > &A, const Vect< T_ > &b) |
Operator * (Multiply vector by matrix and return resulting vector. More... | |
template<class T_ > | |
ostream & | operator<< (ostream &s, const SpMatrix< T_ > &A) |
Output matrix in output stream. More... | |
template<class T_ > | |
Vect< T_ > | operator* (const TrMatrix< T_ > &A, const Vect< T_ > &b) |
Operator * (Multiply vector by matrix and return resulting vector. More... | |
template<class T_ > | |
TrMatrix< T_ > | operator* (T_ a, const TrMatrix< T_ > &A) |
Operator * (Premultiplication of matrix by constant) More... | |
template<class T_ > | |
ostream & | operator<< (ostream &s, const TrMatrix< T_ > &A) |
Output matrix in output stream. More... | |
template<class T_ > | |
Vect< T_ > | operator+ (const Vect< T_ > &x, const Vect< T_ > &y) |
Operator + (Addition of two instances of class Vect) More... | |
template<class T_ > | |
Vect< T_ > | operator- (const Vect< T_ > &x, const Vect< T_ > &y) |
Operator - (Difference between two vectors of class Vect) More... | |
template<class T_ > | |
Vect< T_ > | operator* (const T_ &a, const Vect< T_ > &x) |
Operator * (Premultiplication of vector by constant) More... | |
template<class T_ > | |
Vect< T_ > | operator* (const Vect< T_ > &x, const T_ &a) |
Operator * (Postmultiplication of vector by constant) More... | |
template<class T_ > | |
Vect< T_ > | operator/ (const Vect< T_ > &x, const T_ &a) |
Operator / (Divide vector entries by constant) More... | |
template<class T_ > | |
T_ | Dot (const Vect< T_ > &x, const Vect< T_ > &y) |
Calculate dot product of two vectors. More... | |
void | Modulus (const Vect< complex_t > &x, Vect< real_t > &y) |
Calculate modulus of complex vector. More... | |
void | Real (const Vect< complex_t > &x, Vect< real_t > &y) |
Calculate real part of complex vector. More... | |
void | Imag (const Vect< complex_t > &x, Vect< real_t > &y) |
Calculate imaginary part of complex vector. More... | |
template<class T_ > | |
istream & | operator>> (istream &s, Vect< T_ > &v) |
template<class T_ > | |
ostream & | operator<< (ostream &s, const Vect< T_ > &v) |
Output vector in output stream. More... | |
real_t | operator* (const vector< real_t > &x, const vector< real_t > &y) |
Operator * (Dot product of 2 vector instances) More... | |
Friends | |
template<class TT_ > | |
ostream & | operator<< (ostream &s, const SpMatrix< TT_ > &A) |
Vector and matrix classes.
Calculate dot product of 2 vectors (instances of class LocalVect)
Calculate dot product of two vectors.
Calculate imaginary part of complex vector.
[in] | x | Vector with complex value entries |
[out] | y | Vector containing imaginary parts of entries of x |
Calculate modulus of complex vector.
[in] | x | Vector with complex value entries |
[out] | y | Vector containing moduli of entries of x |
LocalMatrix< T_, NR_, NC_ > operator* | ( | T_ | a, |
const LocalMatrix< T_, NR_, NC_ > & | x | ||
) |
Operator * (Multiply matrix x
by scalar a
)
a*x
LocalVect< T_, NR_, NC_ > operator* | ( | const LocalMatrix< T_, NR_, NC_ > & | x, |
const LocalVect< T_, NC_ > & | x | ||
) |
Operator *
(Multiply matrix A
by vector x
)
This function performs a matrix-vector product and returns resulting vector as a reference to LocalVect instance
A*x
Operator * (Premultiplication of vector by constant)
Operator * (Premultiplication of matrix by constant)
Operator * (Premultiplication of matrix by constant)
Operator * (Dot product of 2 vector instances)
x.y
Operator * (Premultiplication of vector by constant)
a*x
Operator * (Postmultiplication of vector by constant)
x*a
Operator + (Add two vectors)
LocalMatrix< T_, NR_, NC_ > operator+ | ( | const LocalMatrix< T_, NR_, NC_ > & | x, |
const LocalMatrix< T_, NR_, NC_ > & | y | ||
) |
Operator +
(Add matrix x to y)
x+y
Operator + (Addition of two instances of class Vect)
x + y
Operator - (Subtract two vectors)
LocalMatrix< T_, NR_, NC_ > operator- | ( | const LocalMatrix< T_, NR_, NC_ > & | x, |
const LocalMatrix< T_, NR_, NC_ > & | y | ||
) |
Operator -
(Subtract matrix y from x)
x-y
Operator - (Difference between two vectors of class Vect)
x - y
LocalMatrix< T_, NR_, NC_ > operator/ | ( | T_ | a, |
const LocalMatrix< T_, NR_, NC_ > & | x | ||
) |
Operator /
(Divide matrix x
by scalar a
)
x/a
Operator / (Division of vector by constant)
Operator / (Divide vector entries by constant)
x/a
ostream & operator<< | ( | ostream & | s, |
const TrMatrix< T_ > & | a | ||
) |
Output matrix in output stream.
ostream & operator<< | ( | ostream & | s, |
const SkSMatrix< T_ > & | a | ||
) |
Output matrix in output stream.
ostream & operator<< | ( | ostream & | s, |
const SkMatrix< T_ > & | a | ||
) |
Output matrix in output stream.
ostream & operator<< | ( | ostream & | s, |
const SpMatrix< T_ > & | A | ||
) |
Output matrix in output stream.
ostream & operator<< | ( | ostream & | s, |
const Vect< T_ > & | v | ||
) |
Output vector in output stream.
Level of vector output depends on the global variable Verbosity
istream & operator>> | ( | istream & | s, |
Vect< T_ > & | a | ||
) |
Read vector from input stream
Calculate real part of complex vector.
[in] | x | Vector with complex value entries |
[out] | y | Vector containing real parts of entries of x |
|
friend |
Output matrix in output stream