Header wrapper for bidiag_base.h. More...
#include <o2scl/err_hnd.h>
#include <o2scl/permutation.h>
#include <o2scl/cblas.h>
#include <o2scl/householder.h>
#include <o2scl/givens.h>
#include "bidiag_base.h"
Go to the source code of this file.
Namespaces | |
o2scl_linalg | |
The namespace for linear algebra classes and functions. | |
o2scl_linalg_bracket | |
The namespace for linear algebra classes and functions with operator() | |
Macros | |
#define | O2SCL_IX(V, i) V[i] |
#define | O2SCL_IX2(M, i, j) M(i,j) |
#define | O2SCL_IX(V, i) V[i] |
#define | O2SCL_IX2(M, i, j) M[i][j] |
Functions | |
template<class mat_t , class vec_t , class vec2_t > | |
int | o2scl_linalg::o2scl_linalg::bidiag_decomp (size_t M, size_t N, mat_t &A, vec_t &tau_U, vec2_t &tau_V) |
Factor a matrix into bidiagonal form. More... | |
template<class mat_t , class vec_t , class mat2_t , class vec2_t , class mat3_t , class vec3_t , class vec4_t > | |
int | o2scl_linalg::o2scl_linalg::bidiag_unpack (size_t M, size_t N, const mat_t &A, const vec_t &tau_U, mat2_t &U, const vec2_t &tau_V, mat3_t &V, vec3_t &diag, vec4_t &superdiag) |
Unpack a matrix A with the bidiagonal decomposition and create matrices U , V , diagonal diag and superdiagonal superdiag . More... | |
template<class mat_t , class vec_t , class vec2_t , class mat2_t > | |
int | o2scl_linalg::o2scl_linalg::bidiag_unpack2 (size_t M, size_t N, mat_t &A, vec_t &tau_U, vec2_t &tau_V, mat2_t &V) |
Unpack a matrix A with the bidiagonal decomposition and create matrix V . | |
template<class mat_t , class vec_t , class vec2_t > | |
int | o2scl_linalg::o2scl_linalg::bidiag_unpack_B (size_t M, size_t N, const mat_t &A, vec_t &diag, vec2_t &superdiag) |
Unpack the diagonal and superdiagonal of the bidiagonal decomposition of A into diag and superdiag . | |
template<class mat_t , class vec_t , class vec2_t > | |
int | o2scl_linalg_bracket::o2scl_linalg::bidiag_decomp (size_t M, size_t N, mat_t &A, vec_t &tau_U, vec2_t &tau_V) |
Factor a matrix into bidiagonal form. More... | |
template<class mat_t , class vec_t , class mat2_t , class vec2_t , class mat3_t , class vec3_t , class vec4_t > | |
int | o2scl_linalg_bracket::o2scl_linalg::bidiag_unpack (size_t M, size_t N, const mat_t &A, const vec_t &tau_U, mat2_t &U, const vec2_t &tau_V, mat3_t &V, vec3_t &diag, vec4_t &superdiag) |
Unpack a matrix A with the bidiagonal decomposition and create matrices U , V , diagonal diag and superdiagonal superdiag . More... | |
template<class mat_t , class vec_t , class vec2_t , class mat2_t > | |
int | o2scl_linalg_bracket::o2scl_linalg::bidiag_unpack2 (size_t M, size_t N, mat_t &A, vec_t &tau_U, vec2_t &tau_V, mat2_t &V) |
Unpack a matrix A with the bidiagonal decomposition and create matrix V . | |
template<class mat_t , class vec_t , class vec2_t > | |
int | o2scl_linalg_bracket::o2scl_linalg::bidiag_unpack_B (size_t M, size_t N, const mat_t &A, vec_t &diag, vec2_t &superdiag) |
Unpack the diagonal and superdiagonal of the bidiagonal decomposition of A into diag and superdiag . | |
int o2scl_linalg::o2scl_linalg::bidiag_decomp | ( | size_t | M, |
size_t | N, | ||
mat_t & | A, | ||
vec_t & | tau_U, | ||
vec2_t & | tau_V | ||
) |
Factor matrix A of size (M,N)
with into
where U and V are orthogonal and B is upper bidiagonal.
After the function call, the matrix is stored the diagonal and first superdiagonal of
A
. The matrices and
are stored as packed sets of Householder transformations in the lower and upper triangular parts of
A
, respectively.
Adapted from the GSL version which was based on algorithm 5.4.2 in Golub96.
int o2scl_linalg_bracket::o2scl_linalg::bidiag_decomp | ( | size_t | M, |
size_t | N, | ||
mat_t & | A, | ||
vec_t & | tau_U, | ||
vec2_t & | tau_V | ||
) |
Factor matrix A of size (M,N)
with into
where U and V are orthogonal and B is upper bidiagonal.
After the function call, the matrix is stored the diagonal and first superdiagonal of
A
. The matrices and
are stored as packed sets of Householder transformations in the lower and upper triangular parts of
A
, respectively.
Adapted from the GSL version which was based on algorithm 5.4.2 in Golub96.
int o2scl_linalg::o2scl_linalg::bidiag_unpack | ( | size_t | M, |
size_t | N, | ||
const mat_t & | A, | ||
const vec_t & | tau_U, | ||
mat2_t & | U, | ||
const vec2_t & | tau_V, | ||
mat3_t & | V, | ||
vec3_t & | diag, | ||
vec4_t & | superdiag | ||
) |
Given a matrix A
of size (M,N)
with created by bidiag_decomp(), this function creates the matrix
U
of size (M,N)
, the matrix V
of size (N,N)
, the diagonal diag
of size N
and the super-diagonal superdiag
of size N-1
.
int o2scl_linalg_bracket::o2scl_linalg::bidiag_unpack | ( | size_t | M, |
size_t | N, | ||
const mat_t & | A, | ||
const vec_t & | tau_U, | ||
mat2_t & | U, | ||
const vec2_t & | tau_V, | ||
mat3_t & | V, | ||
vec3_t & | diag, | ||
vec4_t & | superdiag | ||
) |
Given a matrix A
of size (M,N)
with created by bidiag_decomp(), this function creates the matrix
U
of size (M,N)
, the matrix V
of size (N,N)
, the diagonal diag
of size N
and the super-diagonal superdiag
of size N-1
.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).