|
PWIZ_API_DECL double | erf (double x) |
| real error function; calls gcc-provided erf, complex version (below) on msvc More...
|
|
PWIZ_API_DECL std::complex< double > | erf (const std::complex< double > &z) |
| complex error function More...
|
|
PWIZ_API_DECL std::complex< double > | erf_series2 (const std::complex< double > &z) |
| series implementation for testing More...
|
|
template<class T > |
void | TransposeMultiply (const ublas::vector< T > &vector, ublas::matrix< T > &result, size_t size) |
|
template<class T > |
void | HouseholderCornerSubstraction (ublas::matrix< T > &LeftLarge, const ublas::matrix< T > &RightSmall) |
|
template<class T > |
void | HouseholderQR (const ublas::matrix< T > &M, ublas::matrix< T > &Q, ublas::matrix< T > &R) |
|
std::ostream & | operator<< (std::ostream &os, const OrderedPair &p) |
|
std::istream & | operator>> (std::istream &is, OrderedPair &p) |
|
bool | operator== (const OrderedPair &a, const OrderedPair &b) |
|
bool | operator!= (const OrderedPair &a, const OrderedPair &b) |
|
PWIZ_API_DECL std::ostream & | operator<< (std::ostream &os, const Parabola &p) |
|
template<class matrix_type , class vector_type > |
void | Reflector (const vector_type &x, matrix_type &F) |
|
template<class matrix_type , class vector_type > |
matrix_type | Reflector (const vector_type &x) |
|
template<class matrix_type > |
void | qr (const matrix_type &A, matrix_type &Q, matrix_type &R) |
|
template<class matrix_type >
void pwiz::math::qr |
( |
const matrix_type & |
A, |
|
|
matrix_type & |
Q, |
|
|
matrix_type & |
R |
|
) |
| |
Definition at line 81 of file qr.hpp.
83 using namespace boost::numeric::ublas;
85 typedef typename matrix_type::size_type size_type;
86 typedef typename matrix_type::value_type value_type;
92 identity_matrix<value_type> ident(m);
93 if (Q.size1() != ident.size1() || Q.size2() != ident.size2())
94 Q = matrix_type(m, m);
100 for (size_type
k=0;
k< R.size1() &&
k<R.size2();
k++)
102 slice s1(
k, 1, m -
k);
103 slice s2(
k, 0, m -
k);
104 unit_vector<value_type> e1(m -
k, 0);
107 matrix_vector_slice<matrix_type>
x(R, s1, s2);
108 matrix_type
F(
x.size(),
x.size());
112 matrix_type temp = subrange(R,
k, m,
k, n);
114 subrange(R,
k, m,
k, n) = prod(
F, temp);
118 identity_matrix<value_type> iqk(
A.size1());
119 matrix_type Q_k(iqk);
121 subrange(Q_k, Q_k.size1() -
F.size1(), Q_k.size1(),
122 Q_k.size2() -
F.size2(), Q_k.size2()) =
F;
References A, F, k, Reflector(), and x.
Referenced by pwiz::math::LinearSolver< LinearSolverType_QR >::solve().