The following group of methods can be used to obtain the main characteristics of matrices:
In addition, the following characteristics are defined for vectors:
The sizes of objects (as well as the indexing of elements in them) use values of the ulong type.
ulong matrix<T>::Rows()
ulong matrix<T>::Cols()
ulong vector<T>::Size()
Most of the other characteristics are real numbers.
double vector<T>::Norm(const ENUM_VECTOR_NORM norm, const int norm_p = 2)
double matrix<T>::Norm(const ENUM_MATRIX_NORM norm)
double matrix<T>::Cond(const ENUM_MATRIX_NORM norm)
double matrix<T>::Det()
double matrix<T>::SLogDet(int &sign)
double matrix<T>::Trace()
The rank and spectrum are, respectively, an integer and a vector.
int matrix<T>::Rank()
vector matrix<T>::Spectrum()
Matrix rank calculation example:
matrix a = matrix::Eye(4, 4);
|
And here is the result of the script execution:
matrix a (eye)
|