#include <LinearSolver.hpp>
|
template<typename matrix_type , typename vector_type > |
vector_type | solve (const matrix_type &A, const vector_type &y) |
| solve system of linear equations Ax = y using boost::ublas; note: extra copying inefficiencies for ease of client use More...
|
|
template<>
class pwiz::math::LinearSolver< LinearSolverType_QR >
Definition at line 82 of file LinearSolver.hpp.
template<typename matrix_type , typename vector_type >
solve system of linear equations Ax = y using boost::ublas; note: extra copying inefficiencies for ease of client use
Definition at line 89 of file LinearSolver.hpp.
References pwiz::math::qr().
Referenced by pwiz::math::LinearLeastSquares< LinearLeastSquaresType_QR >::solve(), and testDoubleQR().
91 typedef typename matrix_type::size_type size_type;
92 typedef typename matrix_type::value_type value_type;
94 namespace ublas = boost::numeric::ublas;
96 matrix_type Q(
A.size1(),
A.size2()), R(
A.size1(),
A.size2());
100 vector_type b = prod(trans(Q),
y);
103 if (R.size1() > R.size2())
105 size_type min = (R.size1() < R.size2() ? R.size1() : R.size2());
107 result = ublas::solve(subrange(R, 0, min, 0, min),
113 result = ublas::solve(R, b, ublas::upper_tag());
void qr(const matrix_type &A, matrix_type &Q, matrix_type &R)
KernelTraitsBase< Kernel >::space_type::ordinate_type y
The documentation for this class was generated from the following file: