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) |
Detailed Description
Vector and matrix classes.
Function Documentation
BMatrix< T_ > operator* | ( | T_ | a, |
const BMatrix< T_ > & | A | ||
) |
Operator * (Premultiplication of matrix by constant)
- Returns
- a*A
LocalMatrix< T_, NR_, NC_ > operator* | ( | T_ | a, |
const LocalMatrix< T_, NR_, NC_ > & | x | ||
) |
Operator * (Multiply matrix x
by scalar a
)
- Returns
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
- Returns
A*x
LocalMatrix< T_, NR_, NC_ > operator/ | ( | T_ | a, |
const LocalMatrix< T_, NR_, NC_ > & | x | ||
) |
Operator /
(Divide matrix x
by scalar a
)
- Returns
x/a
LocalMatrix< T_, NR_, NC_ > operator+ | ( | const LocalMatrix< T_, NR_, NC_ > & | x, |
const LocalMatrix< T_, NR_, NC_ > & | y | ||
) |
Operator +
(Add matrix x to y)
- Returns
x+y
LocalMatrix< T_, NR_, NC_ > operator- | ( | const LocalMatrix< T_, NR_, NC_ > & | x, |
const LocalMatrix< T_, NR_, NC_ > & | y | ||
) |
Operator -
(Subtract matrix y from x)
- Returns
x-y
Operator + (Add two vectors)
- Returns
- x+y
Operator - (Subtract two vectors)
- Returns
- x-y
LocalVect< T_, N_ > operator* | ( | T_ | a, |
const LocalVect< T_, N_ > & | x | ||
) |
Operator * (Premultiplication of vector by constant)
- Returns
- a*x
LocalVect< T_, N_ > operator/ | ( | T_ | a, |
const LocalVect< T_, N_ > & | x | ||
) |
Operator / (Division of vector by constant)
- Returns
- x/a
Calculate dot product of 2 vectors (instances of class LocalVect)
- Returns
- Dot product
ostream & operator<< | ( | ostream & | s, |
const SkMatrix< T_ > & | a | ||
) |
Output matrix in output stream.
- Author
- Rachid Touzani
- Copyright
- GNU Lesser Public License
- Author
- Rachid Touzani
- Copyright
- GNU Lesser Public License
ostream & operator<< | ( | ostream & | s, |
const SkSMatrix< T_ > & | a | ||
) |
Output matrix in output stream.
- Author
- Rachid Touzani
- Copyright
- GNU Lesser Public License
ostream & operator<< | ( | ostream & | s, |
const SpMatrix< T_ > & | A | ||
) |
Output matrix in output stream.
- Author
- Rachid Touzani
- Copyright
- GNU Lesser Public License
TrMatrix< T_ > operator* | ( | T_ | a, |
const TrMatrix< T_ > & | A | ||
) |
Operator * (Premultiplication of matrix by constant)
- Returns
- a*A
- Author
- Rachid Touzani
- Copyright
- GNU Lesser Public License
ostream & operator<< | ( | ostream & | s, |
const TrMatrix< T_ > & | a | ||
) |
Output matrix in output stream.
- Author
- Rachid Touzani
- Copyright
- GNU Lesser Public License
Operator + (Addition of two instances of class Vect)
- Returns
x + y
Operator - (Difference between two vectors of class Vect)
- Returns
x - y
Vect< T_ > operator* | ( | const T_ & | a, |
const Vect< T_ > & | x | ||
) |
Operator * (Premultiplication of vector by constant)
- Returns
a*x
Vect< T_ > operator* | ( | const Vect< T_ > & | x, |
const T_ & | a | ||
) |
Operator * (Postmultiplication of vector by constant)
- Returns
x*a
Vect< T_ > operator/ | ( | const Vect< T_ > & | x, |
const T_ & | a | ||
) |
Operator / (Divide vector entries by constant)
- Returns
x/a
Calculate dot product of two vectors.
- Returns
- Dot (inner or scalar) product Calculate dot (scalar) product of two vectors
Calculate modulus of complex vector.
- Parameters
-
[in] x Vector with complex value entries [out] y Vector containing moduli of entries of x
Calculate real part of complex vector.
- Parameters
-
[in] x Vector with complex value entries [out] y Vector containing real parts of entries of x
Calculate imaginary part of complex vector.
- Parameters
-
[in] x Vector with complex value entries [out] y Vector containing imaginary parts of entries of x
istream & operator>> | ( | istream & | s, |
Vect< T_ > & | a | ||
) |
Read vector from input stream
ostream & operator<< | ( | ostream & | s, |
const Vect< T_ > & | v | ||
) |
Output vector in output stream.
Level of vector output depends on the global variable Verbosity
- If Verbosity=0, this function outputs vector size only.
- If Verbosity>0, this function outputs vector size, vector name, value of time, and number of components
- If Verbosity>1, this function outputs in addition the first 10 entries in vector
- If Verbosity>2, this function outputs in addition the first 50 entries in vector
- If Verbosity>3, this function outputs in addition the first 100 entries in vector
- If Verbosity>4, this function outputs all vector entries
- Author
- Rachid Touzani
- Copyright
- GNU Lesser Public License
Operator * (Dot product of 2 vector instances)
- Returns
x.y
Friends
|
friend |
Output matrix in output stream