Go to the source code of this file.
Namespaces | |
namespace | mimo |
Complex Matrix operations | |
int | real_size (const CMatrix &, int complex_size) |
const Complex & | c_assign (CMatrix &A, int i, int j, const Complex &c) |
Complex | c_access (const CMatrix &A, int i, int j) |
std::ostream & | c_print (std::ostream &s, const CMatrix &G) |
int | c_size (const CMatrix &A, int dim) |
CMatrix | c_eye (int i) |
CMatrix | c_zeros (int i, int j) |
CMatrix | c_ones (int i, int j) |
const Complex & | c_add_s (CMatrix &A, int i, int j, const Complex &c) |
simth::Complex | c_det (const CMatrix &A) |
Real-valued Matrix operations | |
Matrix | eye (int i) |
Matrix | zeros (int i, int j) |
Matrix | ones (int i, int j) |
double | det (const Matrix &A) |
Complex Vector operations | |
const Complex & | c_assign (CVector &A, int i, const Complex &c) |
Complex | c_access (const CVector &A, int i) |
std::ostream & | c_print (std::ostream &s, const CVector &G) |
int | c_size (const CVector &A) |
const Complex & | c_add_s (CVector &a, int i, const Complex &c) |
CVector | c_ones (int i) |
CVector | c_zeros (int i) |
Vector | zeros (int i) |
Blas routines | |
All of these are originally defined inside the Blas++ headers. But there, they are (of course) only defined for real-valued vectors. Here we add versions that can deal with our complex vectors and matrices and also Complex numbers. | |
void | Blas_Add_Mult (CVector &dy, const Complex &c, const CVector &dx) |
void | Blas_Mult (CVector &dy, const Complex &c, const CVector &dx) |
void | Blas_Scale (const Complex &c, CVector &dx) |
Complex | Blas_Dot_Prod (const CVector &dx, const CVector &dy) |
void | Blas_R1_Update (CMatrix &A, const CVector &dx, const CVector &dy, const Complex &alpha) |
double | Blas_NormF (const CMatrix &A) |
double | Blas_NormF (const Matrix &A) |
double | Blas_Cond (const CMatrix &a, double threshold=0.0) |
unsigned | Blas_Rank (const CMatrix &a, double threshold=0.0) |
double | Blas_NormF_squared (const CMatrix &A) |
void | Mat_Add_Norm (Matrix &A, const CMatrix &B) |
Defines | |
#define | LA_COMPLEX_SUPPORT |
Typedefs | |
typedef LaComplex | Complex |
We need a special complex type here. It has the necessary conversion operators to everything else. | |
typedef LaGenMatDouble | Matrix |
Matrix of real double values. | |
typedef LaVectorDouble | Vector |
Vector of real double values. | |
typedef LaGenMatComplex | CMatrix |
Matrix of complex double values. | |
typedef LaVectorComplex | CVector |
Vector of complex double values. |
The matrix and vector types appear for complex and real (double) values.
Historical note: Until 2004-01-14, we used a 'pseudo-complex matrix' which in fact was a real-valued matrix of double the size. This was the reason why we invented the c_access and c_assign functions.
|
|
|
We need a special complex type here. It has the necessary conversion operators to everything else.
|
|
Matrix of real double values.
|
|
Vector of real double values.
|
|
Matrix of complex double values. This is a matrix of complex (double) values. The row and column indices for accessing elements start from zero, different from what you would write in mathematical notation. This means you have
but for accessing the element you have to write More (but sometimes outdated) documentation can be found in the Lapackpp header files. Historical note: Until 2004-01-14, we used a 'pseudo-complex matrix' which in fact was a real-valued matrix of double the size. This was the reason why we invented the c_access and c_assign functions. |
|
Vector of complex double values. This is a vector of complex (double) values. The element indices start from zero, different from what you would write in mathematical notation. This means you have
but for accessing the element you have to write More (but sometimes outdated) documentation can be found in the Lapackpp header files. Historical note: Until 2004-01-14, we used a 'pseudo-complex vector' which in fact was a real-valued vector of double the size. This was the reason why we invented the c_access and c_assign functions. |
|
DEPRECATED. Returns the actual storage size for any given complex_size of the complex Matrix type. This function has no effect any longer -- it simply returns its argument. Historical note: This function used to be necessary until 2004-01-14, when 'pseudo-complex matrices' were used instead of native complex matrices. After that date, this project uses natively complex matrices and this function now is no longer necessary.
|
|
Assigns a complex value to an element of the given complex matrix A. Even though this function is not strictly necessary nowadays, it might still be useful in order to have the correct type conversions taking place. Historical note: This function used to be necessary until 2004-01-14, when 'pseudo-complex matrices' were used instead of native complex matrices. After that date, this project uses natively complex matrices and this function now is no longer necessary.
|
|
Returns a complex element of the complex matrix A. Even though this function is not strictly necessary nowadays, it might still be useful in order to have the correct type conversions taking place. Historical note: This function used to be necessary until 2004-01-14, when 'complex matrices' were used instead of native complex matrices. After that date, this project uses natively complex matrices and this function now is no longer necessary.
|
|
DEPRECATED. Print the complex matrices. |
|
DEPRECATED. Returns the complex size of the complex matrix. Historical note: This function used to be necessary until 2004-01-14, when 'pseudo-complex matrices' were used instead of native complex matrices. After that date, this project uses natively complex matrices and this function now is no longer necessary.
|
|
Returns a newly created identity matrix, with complex size i x i. |
|
Returns a newly created matrix of zeros, with complex size i x j. |
|
Returns a newly created matrix of ones, with complex size i x j. |
|
Add a complex scalar to a matrix component. Even though this function is not strictly necessary nowadays, it might still be useful in order to have the correct type conversions taking place. Historical note: This function used to be necessary until 2004-01-14, when 'pseudo-complex matrices' were used instead of native complex matrices. After that date, this project uses natively complex matrices and this function now is no longer necessary.
|
|
Returns the complex determinant of the complex square matrix A. This algorithm calculated the LU factorization and multiplies its diagonal. |
|
Returns a newly created identity matrix (square), with size i x i |
|
Returns a newly created matrix of zeros, with size i x j. |
|
Returns a newly created matrix of ones, with size i x j. |
|
Returns the determinant of the square matrix A. This algorithm calculated the LU factorization and multiplies its diagonal. |
|
Assigns a complex value to an element of the given complex vector A Even though this function is not strictly necessary nowadays, it might still be useful in order to have the correct type conversions taking place. Historical note: This function used to be necessary until 2004-01-14, when 'pseudo-complex matrices' were used instead of native complex matrices. After that date, this project uses natively complex matrices and this function now is no longer necessary.
|
|
Returns a complex element of the complex vector A. Even though this function is not strictly necessary nowadays, it might still be useful in order to have the correct type conversions taking place. Historical note: This function used to be necessary until 2004-01-14, when 'pseudo-complex matrices' were used instead of native complex matrices. After that date, this project uses natively complex matrices and this function now is no longer necessary.
|
|
DEPRECATED. Print the complex vector. |
|
DEPRECATED. Returns the complex size of the complex vector. |
|
Add a complex scalar to a vector component. Even though this function is not strictly necessary nowadays, it might still be useful in order to have the correct type conversions taking place. Historical note: This function used to be necessary until 2004-01-14, when 'pseudo-complex matrices' were used instead of native complex matrices. After that date, this project uses natively complex matrices and this function now is no longer necessary.
|
|
Returns a newly created vector of ones, with complex size i x j. |
|
Returns a newly created vector of zeros, with complex size i x j. |
|
Returns a newly created vector of zeros, with size i x j. |
|
Combined vector scaling and addition: dy = dy + c * dx |
|
Combined vector scaling: dy = c * dx |
|
Vector scaling: dx = c * dx |
|
Returns the dot product of two vectors x and y, which is x'*y. Note: For complex vectors this is no longer commutative, but rather complex conjugate commutative. |
|
Perform the rank 1 operation A := alpha*dx*dy' + A Note: the vector dy' is the _conjugate_ transposed of dy. |
|
Returns the Frobenius-Norm of matrix A (also called the Schur- or Euclidean norm): , i.e. the square root of the sum of the absolute squares of its elements.
|
|
Returns the Frobenius-Norm of matrix A (also called the Schur- or Euclidean norm): , i.e. the square root of the sum of the absolute squares of its elements.
|
|
Calculates the condition number of a matrix. This is calculated by calculating the singular values first, which means this operation is probably rather expensive.
Since we are at numerics here, the threshold for considering a value equal to zero can be given as a second argument. Potential values are DBL_EPSILON, 10*DBL_EPSILON, DBL_MIN from
|
|
Calculates the rank of a matrix, which is the number of nonzero singular values. This is calculated by calculating the singular values first, which means this operation is probably rather expensive. The returned value is the number of singular values that are truly greater than the threshold value.
Since we are at numerics here, the threshold for considering a value equal to zero can be given as a second argument. Potential values are DBL_EPSILON, 10*DBL_EPSILON, DBL_MIN from
|
|
DEPRECATED. Returns the squared (!) Frobenius-Norm of matrix A: sum |h_ij|^2 over all i,j. This function is deprecated. Please try to use Blas_Norm2 instead, which will give you the square root of this value. |
|
Calculate the std::norm of each element of B and add it to the respective element of the matrix A. B is a *complex* matrix, whereas A is a real-valued (nonnegative) matrix. |