fortran-lapack
|
Compute a least squares solution to system A \cdot x = b , i.e. such that the 2-norm \|b - A \cdot x\| is minimized. More...
Public Member Functions | |
real(sp) function, dimension(:), allocatable, target | la_slstsq_one (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a real(sp) system of linear equations Ax = B. | |
real(dp) function, dimension(:), allocatable, target | la_dlstsq_one (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a real(dp) system of linear equations Ax = B. | |
real(qp) function, dimension(:), allocatable, target | la_qlstsq_one (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a real(qp) system of linear equations Ax = B. | |
complex(sp) function, dimension(:), allocatable, target | la_clstsq_one (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a complex(sp) system of linear equations Ax = B. | |
complex(dp) function, dimension(:), allocatable, target | la_zlstsq_one (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a complex(dp) system of linear equations Ax = B. | |
complex(qp) function, dimension(:), allocatable, target | la_wlstsq_one (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a complex(qp) system of linear equations Ax = B. | |
real(sp) function, dimension(:,:), allocatable, target | la_slstsq_multiple (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a real(sp) system of linear equations Ax = B. | |
real(dp) function, dimension(:,:), allocatable, target | la_dlstsq_multiple (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a real(dp) system of linear equations Ax = B. | |
real(qp) function, dimension(:,:), allocatable, target | la_qlstsq_multiple (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a real(qp) system of linear equations Ax = B. | |
complex(sp) function, dimension(:,:), allocatable, target | la_clstsq_multiple (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a complex(sp) system of linear equations Ax = B. | |
complex(dp) function, dimension(:,:), allocatable, target | la_zlstsq_multiple (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a complex(dp) system of linear equations Ax = B. | |
complex(qp) function, dimension(:,:), allocatable, target | la_wlstsq_multiple (a, b, cond, overwrite_a, rank, err) |
Compute the least-squares solution to a complex(qp) system of linear equations Ax = B. | |
Compute a least squares solution to system A \cdot x = b , i.e. such that the 2-norm \|b - A \cdot x\| is minimized.
This function computes the least-squares solution to a real system of linear equations:
A \cdot x = b
where A is an n x n
matrix and b is either a vector (n
) or a matrix (n x nrhs
). The solution x
is returned as an allocatable array.
[in,out] | a | The input matrix of size n x n . If overwrite_a is true, the contents of A may be modified during computation. |
[in] | b | The right-hand side vector (n ) or matrix (n x nrhs ). |
[in] | cond | (Optional) A cutoff for rank evaluation: singular values s(i) such that s(i) \leq \text{cond} \cdot \max(s) are considered zero. |
[in] | overwrite_a | (Optional) If true, A and B may be overwritten and destroyed. Default is false. |
[out] | rank | (Optional) The rank of the matrix A. |
[out] | err | (Optional) A state return flag. If an error occurs and err is not provided, the function will stop execution. |
x
of size n
(for a single right-hand side) or n x nrhs
.[*GELSS](@ref la_lapack::gelss)
.overwrite_a
is enabled, the original contents of A and B may be lost. complex(sp) function, dimension(:,:), allocatable, target la_least_squares::lstsq::la_clstsq_multiple | ( | complex(sp), dimension(:,:), intent(inout), target | a, |
complex(sp), dimension(:,:), intent(in) | b, | ||
real(sp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a complex(sp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
complex(sp) function, dimension(:), allocatable, target la_least_squares::lstsq::la_clstsq_one | ( | complex(sp), dimension(:,:), intent(inout), target | a, |
complex(sp), dimension(:), intent(in) | b, | ||
real(sp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a complex(sp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
real(dp) function, dimension(:,:), allocatable, target la_least_squares::lstsq::la_dlstsq_multiple | ( | real(dp), dimension(:,:), intent(inout), target | a, |
real(dp), dimension(:,:), intent(in) | b, | ||
real(dp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a real(dp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
real(dp) function, dimension(:), allocatable, target la_least_squares::lstsq::la_dlstsq_one | ( | real(dp), dimension(:,:), intent(inout), target | a, |
real(dp), dimension(:), intent(in) | b, | ||
real(dp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a real(dp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
real(qp) function, dimension(:,:), allocatable, target la_least_squares::lstsq::la_qlstsq_multiple | ( | real(qp), dimension(:,:), intent(inout), target | a, |
real(qp), dimension(:,:), intent(in) | b, | ||
real(qp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a real(qp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
real(qp) function, dimension(:), allocatable, target la_least_squares::lstsq::la_qlstsq_one | ( | real(qp), dimension(:,:), intent(inout), target | a, |
real(qp), dimension(:), intent(in) | b, | ||
real(qp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a real(qp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
real(sp) function, dimension(:,:), allocatable, target la_least_squares::lstsq::la_slstsq_multiple | ( | real(sp), dimension(:,:), intent(inout), target | a, |
real(sp), dimension(:,:), intent(in) | b, | ||
real(sp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a real(sp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
real(sp) function, dimension(:), allocatable, target la_least_squares::lstsq::la_slstsq_one | ( | real(sp), dimension(:,:), intent(inout), target | a, |
real(sp), dimension(:), intent(in) | b, | ||
real(sp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a real(sp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
complex(qp) function, dimension(:,:), allocatable, target la_least_squares::lstsq::la_wlstsq_multiple | ( | complex(qp), dimension(:,:), intent(inout), target | a, |
complex(qp), dimension(:,:), intent(in) | b, | ||
real(qp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a complex(qp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
complex(qp) function, dimension(:), allocatable, target la_least_squares::lstsq::la_wlstsq_one | ( | complex(qp), dimension(:,:), intent(inout), target | a, |
complex(qp), dimension(:), intent(in) | b, | ||
real(qp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a complex(qp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
complex(dp) function, dimension(:,:), allocatable, target la_least_squares::lstsq::la_zlstsq_multiple | ( | complex(dp), dimension(:,:), intent(inout), target | a, |
complex(dp), dimension(:,:), intent(in) | b, | ||
real(dp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a complex(dp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |
complex(dp) function, dimension(:), allocatable, target la_least_squares::lstsq::la_zlstsq_one | ( | complex(dp), dimension(:,:), intent(inout), target | a, |
complex(dp), dimension(:), intent(in) | b, | ||
real(dp), intent(in), optional | cond, | ||
logical(lk), intent(in), optional | overwrite_a, | ||
integer(ilp), intent(out), optional | rank, | ||
type(la_state), intent(out), optional | err ) |
Compute the least-squares solution to a complex(dp) system of linear equations Ax = B.
[in,out] | a | Input matrix a[n,n] |
[in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
[in] | cond | [optional] cutoff for rank evaluation: singular values s(i)<=cond*maxval(s) are considered 0. |
[in] | overwrite_a | [optional] Can A,b data be overwritten and destroyed? |
[out] | rank | [optional] Return rank of A |
[out] | err | [optional] state return flag. On error if not requested, the code will stop |