89 vector_type
solve(
const matrix_type&
A,
const vector_type&
y)
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());