Clipper
|
General matrix class: like Array2d but with numerical methods. More...
#include <clipper_types.h>
Public Member Functions | |
Matrix () | |
null constructor | |
Matrix (const int &d1, const int &d2) | |
constructor | |
Matrix (const int &d1, const int &d2, T val) | |
constructor | |
std::vector< T > | solve (const std::vector< T > &b) const |
equation solver (square matrices only) | |
std::vector< T > | eigen (const bool sort=true) |
eigenvalue calculation (square symmetric matrices only) | |
Friends | |
std::vector< T > | operator* (const Matrix< T > &m, const std::vector< T > &v) |
Matrix-vector product. |
General matrix class: like Array2d but with numerical methods.
std::vector< T > clipper::Matrix< T >::solve | ( | const std::vector< T > & | b | ) | const |
equation solver (square matrices only)
Solve the system of linear equations Ax=b for x Uses elimination. Only suitable for small systems.
References clipper::Message::message(), clipper::Array2d< T >::rows(), clipper::Array2d< T >::size(), and clipper::Util::swap().
Referenced by clipper::ResolutionFn::ResolutionFn(), and clipper::ResolutionFn_nonlinear::ResolutionFn_nonlinear().
std::vector< T > clipper::Matrix< T >::eigen | ( | const bool | sort = true | ) |
eigenvalue calculation (square symmetric matrices only)
Find the Eigenvalues and Eigenvectors of the matrix. Uses the Jacobi method. Only suitable for small systems (dimension<20). The matrix is replaced by the matrix of eigenvectors (as columns).
sort | Sort the eigenvalues and vectors, smallest first. (default=true) |
References clipper::Message::message(), clipper::Array2d< T >::rows(), and clipper::Util::swap().
Referenced by clipper::RTop_orth::RTop_orth().
std::vector<T> operator* | ( | const Matrix< T > & | m, |
const std::vector< T > & | v | ||
) | [friend] |
Matrix-vector product.
Assumes a column vector