30 assert(n == (
int)(M.
rows()));
32 if (std::fabs(M(0,n-1) - M(n-1,0)) > 1e-8) {
33 std::cerr <<
"vnl_cholesky: WARNING: non-symmetric: " << M << std::endl;
40 std::cerr <<
"vnl_cholesky: " <<
num_dims_rank_def_ <<
" dimensions of non-posdeffness\n";
59 v3p_netlib_dposl_(
A_.
data_block(), &n, &n, x->data_block());
80 v3p_netlib_dpodi_(I.
data_block(), &n, &n, det, &job);
81 return det[0] *
std::pow(10.0, det[1]);
88 std::cerr <<
"vnl_cholesky: Calling inverse() on rank-deficient matrix\n";
95 v3p_netlib_dpodi_(I.
data_block(), &n, &n,
nullptr, &job);
98 for (
int i = 0; i < n; ++i)
99 for (
int j = i+1; j < n; ++j)
111 for (
unsigned i = 0; i < n; ++i) {
113 for (
unsigned j = i+1; j < n; ++j) {
128 for (
unsigned i = 0; i < n; ++i) {
130 for (
unsigned j = i+1; j < n; ++j) {
vnl_matrix< double > upper_triangle() const
Return upper-triangular factor.
vnl_matrix< double > inverse() const
Decomposition of symmetric matrix.
size_t size() const
Return the length, number of elements, dimension of this vector.
T const * data_block() const
Access the contiguous block storing the elements in the vector. O(1).
Operation
Modes of computation. See constructor for details.
vnl_vector< double > solve(vnl_vector< double > const &b) const
Solve LS problem M x = b.
Declare in a central place the list of symbols from netlib.
T const * data_block() const
Access the contiguous block storing the elements in the matrix row-wise. O(1).
vnl_decnum pow(vnl_decnum const &x, unsigned long p)
vnl_cholesky(vnl_matrix< double > const &M, Operation mode=verbose)
Make cholesky decomposition of M optionally computing the reciprocal condition number.
vnl_matrix< double > lower_triangle() const
Return lower-triangular factor.
unsigned int rows() const
Return the number of rows.
double determinant() const
Compute determinant.
unsigned int columns() const
Return the number of columns.