#include <LinearLeastSquares.hpp>
|
template<typename T > |
boost::numeric::ublas::vector< T > | solve (const boost::numeric::ublas::matrix< T > &A, const boost::numeric::ublas::vector< T > &y) |
|
template<>
class pwiz::math::LinearLeastSquares< LinearLeastSquaresType_LU >
Definition at line 40 of file LinearLeastSquares.hpp.
§ solve()
Definition at line 44 of file LinearLeastSquares.hpp.
References y.
47 boost::numeric::ublas::permutation_matrix<std::size_t> m(
A.size1());
48 boost::numeric::ublas::matrix<T> AtA = prod(trans(
A),
A);
49 boost::numeric::ublas::vector<T> b =
y;
50 boost::numeric::ublas::vector<T> r;
54 if (boost::numeric::ublas::lu_factorize(AtA, m) == 0.)
56 r = prod(trans(
A), b);
58 boost::numeric::ublas::lu_substitute(AtA, m, r);
KernelTraitsBase< Kernel >::space_type::ordinate_type y
The documentation for this class was generated from the following file: