cisst-saw
|
Declaration of nmrLSqLin. More...
#include <algorithm>
#include <cisstCommon/cmnThrow.h>
#include <cisstVector/vctFixedSizeMatrix.h>
#include <cisstVector/vctDynamicMatrix.h>
#include <cisstNumerical/nmrNetlib.h>
#include <cisstNumerical/nmrExport.h>
Go to the source code of this file.
Classes | |
class | nmrLSqLinSolutionDynamic |
class | nmrLSqLinSolutionDynamic::Friend |
class | nmrLSqLinSolutionFixedSize< _ma, _me, _mg, _n > |
class | nmrLSqLinSolutionFixedSize< _ma, _me, _mg, _n >::Friend |
Functions | |
template<typename _matrixOwnerType , typename _vectorOwnerType > | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctDynamicMatrixBase< _matrixOwnerType, CISSTNETLIB_DOUBLE > &A, vctDynamicVectorBase< _vectorOwnerType, CISSTNETLIB_DOUBLE > &b, nmrLSqLinSolutionDynamic &solution) throw (std::runtime_error) |
template<typename _matrixOwnerTypeA , typename _vectorOwnerTypeb , typename _matrixOwnerTypeG , typename _vectorOwnerTypeh > | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicVectorBase< _vectorOwnerTypeb, CISSTNETLIB_DOUBLE > &b, vctDynamicMatrixBase< _matrixOwnerTypeG, CISSTNETLIB_DOUBLE > &G, vctDynamicVectorBase< _vectorOwnerTypeh, CISSTNETLIB_DOUBLE > &h, nmrLSqLinSolutionDynamic &solution) throw (std::runtime_error) |
template<typename _matrixOwnerTypeA , typename _vectorOwnerTypeb , typename _matrixOwnerTypeE , typename _vectorOwnerTypef , typename _matrixOwnerTypeG , typename _vectorOwnerTypeh > | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicVectorBase< _vectorOwnerTypeb, CISSTNETLIB_DOUBLE > &b, vctDynamicMatrixBase< _matrixOwnerTypeE, CISSTNETLIB_DOUBLE > &E, vctDynamicVectorBase< _vectorOwnerTypef, CISSTNETLIB_DOUBLE > &f, vctDynamicMatrixBase< _matrixOwnerTypeG, CISSTNETLIB_DOUBLE > &G, vctDynamicVectorBase< _vectorOwnerTypeh, CISSTNETLIB_DOUBLE > &h, nmrLSqLinSolutionDynamic &solution) throw (std::runtime_error) |
template<typename _matrixOwnerTypeA , typename _vectorOwnerTypeb , typename _vectorOwnerTypeX , typename _vectorOwnerTypeWork > | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicVectorBase< _vectorOwnerTypeb, CISSTNETLIB_DOUBLE > &b, vctDynamicVectorBase< _vectorOwnerTypeX, CISSTNETLIB_DOUBLE > &X, vctDynamicVectorBase< _vectorOwnerTypeWork, CISSTNETLIB_DOUBLE > &Work) |
template<typename _matrixOwnerTypeA , typename _vectorOwnerTypeb , typename _vectorOwnerTypeX > | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicVectorBase< _vectorOwnerTypeb, CISSTNETLIB_DOUBLE > &b, vctDynamicVectorBase< _vectorOwnerTypeX, CISSTNETLIB_DOUBLE > &X) |
template<typename _matrixOwnerTypeA , typename _vectorOwnerTypeb , typename _matrixOwnerTypeG , typename _vectorOwnerTypeh , typename _vectorOwnerTypeX , typename _vectorOwnerTypeWork > | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicVectorBase< _vectorOwnerTypeb, CISSTNETLIB_DOUBLE > &b, vctDynamicMatrixBase< _matrixOwnerTypeG, CISSTNETLIB_DOUBLE > &G, vctDynamicVectorBase< _vectorOwnerTypeh, CISSTNETLIB_DOUBLE > &h, vctDynamicVectorBase< _vectorOwnerTypeX, CISSTNETLIB_DOUBLE > &X, vctDynamicVectorBase< _vectorOwnerTypeWork, CISSTNETLIB_DOUBLE > &Work) |
template<typename _matrixOwnerTypeA , typename _vectorOwnerTypeb , typename _matrixOwnerTypeG , typename _vectorOwnerTypeh , typename _vectorOwnerTypeX > | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicVectorBase< _vectorOwnerTypeb, CISSTNETLIB_DOUBLE > &b, vctDynamicMatrixBase< _matrixOwnerTypeG, CISSTNETLIB_DOUBLE > &G, vctDynamicVectorBase< _vectorOwnerTypeh, CISSTNETLIB_DOUBLE > &h, vctDynamicVectorBase< _vectorOwnerTypeX, CISSTNETLIB_DOUBLE > &X) |
template<typename _matrixOwnerTypeA , typename _vectorOwnerTypeb , typename _matrixOwnerTypeE , typename _vectorOwnerTypef , typename _matrixOwnerTypeG , typename _vectorOwnerTypeh , typename _vectorOwnerTypeX , typename _vectorOwnerTypeWork > | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicVectorBase< _vectorOwnerTypeb, CISSTNETLIB_DOUBLE > &b, vctDynamicMatrixBase< _matrixOwnerTypeE, CISSTNETLIB_DOUBLE > &E, vctDynamicVectorBase< _vectorOwnerTypef, CISSTNETLIB_DOUBLE > &f, vctDynamicMatrixBase< _matrixOwnerTypeG, CISSTNETLIB_DOUBLE > &G, vctDynamicVectorBase< _vectorOwnerTypeh, CISSTNETLIB_DOUBLE > &h, vctDynamicVectorBase< _vectorOwnerTypeX, CISSTNETLIB_DOUBLE > &X, vctDynamicVectorBase< _vectorOwnerTypeWork, CISSTNETLIB_DOUBLE > &Work) |
template<typename _matrixOwnerTypeA , typename _vectorOwnerTypeb , typename _matrixOwnerTypeE , typename _vectorOwnerTypef , typename _matrixOwnerTypeG , typename _vectorOwnerTypeh , typename _vectorOwnerTypeX > | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicVectorBase< _vectorOwnerTypeb, CISSTNETLIB_DOUBLE > &b, vctDynamicMatrixBase< _matrixOwnerTypeE, CISSTNETLIB_DOUBLE > &E, vctDynamicVectorBase< _vectorOwnerTypef, CISSTNETLIB_DOUBLE > &f, vctDynamicMatrixBase< _matrixOwnerTypeG, CISSTNETLIB_DOUBLE > &G, vctDynamicVectorBase< _vectorOwnerTypeh, CISSTNETLIB_DOUBLE > &h, vctDynamicVectorBase< _vectorOwnerTypeX, CISSTNETLIB_DOUBLE > &X) |
template<vct::size_type _ma, vct::size_type _n, vct::size_type _work> | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _ma, _n, VCT_COL_MAJOR > &A, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma > &b, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _n > &x, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _work > &Work) |
template<vct::size_type _ma, vct::size_type _n> | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _ma, _n, VCT_COL_MAJOR > &A, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma > &b, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _n > &x) |
template<vct::size_type _ma, vct::size_type _n> | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _ma, _n, VCT_COL_MAJOR > &A, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma > &b, nmrLSqLinSolutionFixedSize< _ma, 0, 0, _n > &solution) |
template<vct::size_type _ma, vct::size_type _mg, vct::size_type _n, vct::size_type _work, vct::size_type _iwork> | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _ma, _n, VCT_COL_MAJOR > &A, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma > &b, vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _mg, _n, VCT_COL_MAJOR > &G, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _mg > &h, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _n > &x, vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _ma+_mg, _n+1, VCT_COL_MAJOR > &W, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma > &RNorm, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _work > &Work, vctFixedSizeVector< CISSTNETLIB_INTEGER, _iwork > &IWork) |
template<vct::size_type _ma, vct::size_type _mg, vct::size_type _n> | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _ma, _n, VCT_COL_MAJOR > &A, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma > &b, vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _mg, _n, VCT_COL_MAJOR > &G, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _mg > &h, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _n > &x) |
template<vct::size_type _ma, vct::size_type _mg, vct::size_type _n> | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _ma, _n, VCT_COL_MAJOR > &A, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma > &b, vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _mg, _n, VCT_COL_MAJOR > &G, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _mg > &h, nmrLSqLinSolutionFixedSize< _ma, 0, _mg, _n > &solution) |
template<vct::size_type _ma, vct::size_type _me, vct::size_type _mg, vct::size_type _n, vct::size_type _work, vct::size_type _iwork> | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _ma, _n, VCT_COL_MAJOR > &A, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma > &b, vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _me, _n, VCT_COL_MAJOR > &E, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _me > &f, vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _mg, _n, VCT_COL_MAJOR > &G, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _mg > &h, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _n > &x, vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _ma+_me+_mg, _n+1, VCT_COL_MAJOR > &W, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma+_me > &RNorm, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _work > &Work, vctFixedSizeVector< CISSTNETLIB_INTEGER, _iwork > &IWork) |
template<vct::size_type _ma, vct::size_type _me, vct::size_type _mg, vct::size_type _n> | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _ma, _n, VCT_COL_MAJOR > &A, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma > &b, vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _me, _n, VCT_COL_MAJOR > &E, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _me > &f, vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _mg, _n, VCT_COL_MAJOR > &G, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _mg > &h, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _n > &x) |
template<vct::size_type _ma, vct::size_type _me, vct::size_type _mg, vct::size_type _n> | |
CISSTNETLIB_INTEGER | nmrLSqLin (vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _ma, _n, VCT_COL_MAJOR > &A, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _ma > &b, vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _me, _n, VCT_COL_MAJOR > &E, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _me > &f, vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _mg, _n, VCT_COL_MAJOR > &G, vctFixedSizeVector< CISSTNETLIB_DOUBLE, _mg > &h, nmrLSqLinSolutionFixedSize< _ma, _me, _mg, _n > &solution) |
Declaration of nmrLSqLin.
|
inline |
This function checks for valid input and calls the LAPACK function. The approach behind this definition of the function is that the user creates a solution object from a code wherein it is safe to do memory allocation. This solution object is then passed to this method along with the matrix and vector whose LSqLin is to be computed. The solution object has members X and Work etc., which can be accessed through calls to method get*() along with adequate workspace for LAPACK. This function modifies the contents of matrix A and possibly the contents of vector b. For details about the nature of the solution matrices see the text above.
A | A matrix of size MxN, of one of vctDynamicMatrix or vctDynamicMatrixRef |
b | A vector of size N, of one of vctDynamicVector or vctDynamicVectorRef |
solution | A solution object of one of the types corresponding to input matrix TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajor nmrLSqLinSolverTest::TestDynamicRowMajor nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc |
|
inline |
This function checks for valid input and calls the LAPACK function. The approach behind this definition of the function is that the user creates a solution object from a code wherein it is safe to do memory allocation. This solution object is then passed to this method along with the matrix and vector whose LSqLin is to be computed. The solution object has members X and Work etc., which can be accessed through calls to method get*() along with adequate workspace for LAPACK. This function modifies the contents of matrix A and possibly the contents of vector b. For details about the nature of the solution matrices see the text above.
A | A matrix of size MxN, of one of vctDynamicMatrix or vctDynamicMatrixRef |
b | A vector of size N, of one of vctDynamicVector or vctDynamicVectorRef |
G | is a reference to a dynamic matrix of size McxN |
h | A vector of size N, of one of vctDynamicVector or vctDynamicVectorRef |
solution | A solution object of one of the types corresponding to input matrix TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajor nmrLSqLinSolverTest::TestDynamicRowMajor nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc |
|
inline |
This function checks for valid input and calls the LAPACK function. The approach behind this definition of the function is that the user creates a solution object from a code wherein it is safe to do memory allocation. This solution object is then passed to this method along with the matrix and vector whose LSqLin is to be computed. The solution object has members X and Work etc., which can be accessed through calls to method get*() along with adequate workspace for LAPACK. This function modifies the contents of matrix A and possibly the contents of vector b. For details about the nature of the solution matrices see the text above.
A | is a reference to a dynamic matrix of size MaxN |
b | A vector of size Ma, of one of vctDynamicVector or vctDynamicVectorRef |
E | is a reference to a dynamic matrix of size MexN |
f | A vector of size Me, of one of vctDynamicVector or vctDynamicVectorRef |
G | is a reference to a dynamic matrix of size MgxN |
h | A vector of size Mg, of one of vctDynamicVector or vctDynamicVectorRef |
X | The output vector for LSqLin |
Work | The workspace for LAPACK. TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajor nmrLSqLinSolverTest::TestDynamicRowMajor nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc |
|
inline |
Basic version of LSqLin where user provides the input matrix as well as storage for output and workspace needed by LAPACK. No mem allocation is done in this function, user allocates everything inlcuding workspace. The LSqLin method verifies that the size of the solution objects matches the input. See static methods in nmrLSqLinSolutionDynamic for helper functions that help determine the min workspace required. This function modifies the contents of matrix A and possibly vector b. For sizes of other matrices see text above.
A | is a reference to a dynamic matrix of size MxN |
b | A vector of size N, of one of vctDynamicVector or vctDynamicVectorRef |
X | The output vector for LSqLin |
Work | The workspace for LAPACK. TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc |
|
inline |
Basic version of LSqLin where user provides the input matrix as well as storage for output. The LSqLin method verifies that the size of the solution objects matches the input and allocates workspace memory, which is deallocated when the function ends. This function modifies the contents of matrix A and possibly vector b. For sizes of other matrices see text above.
A | is a reference to a dynamic matrix of size MxN |
b | A vector of size N, of one of vctDynamicVector or vctDynamicVectorRef |
X | The output vector for LSqLin TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc |
|
inline |
Basic version of LSqLin where user provides the input matrix as well as storage for output. The LSqLin method verifies that the size of the solution objects matches the input and allocates workspace memory, which is deallocated when the function ends. This function modifies the contents of matrix A and possibly vector b. For sizes of other matrices see text above.
A | is a reference to a dynamic matrix of size MaxN |
b | A vector of size Ma, of one of vctDynamicVector or vctDynamicVectorRef |
G | is a reference to a dynamic matrix of size MgxN |
h | A vector of size Mg, of one of vctDynamicVector or vctDynamicVectorRef |
X | The output vector for LSqLin |
Work | The workspace for LAPACK. TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc |
|
inline |
Basic version of LSqLin where user provides the input matrix as well as storage for output. The LSqLin method verifies that the size of the solution objects matches the input and allocates workspace memory, which is deallocated when the function ends. This function modifies the contents of matrix A and possibly vector b. For sizes of other matrices see text above.
A | is a reference to a dynamic matrix of size MaxN |
b | A vector of size Ma, of one of vctDynamicVector or vctDynamicVectorRef |
G | is a reference to a dynamic matrix of size MgxN |
h | A vector of size Mg, of one of vctDynamicVector or vctDynamicVectorRef |
X | The output vector for LSqLin TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc |
|
inline |
Basic version of LSqLin where user provides the input matrix as well as storage for output. The LSqLin method verifies that the size of the solution objects matches the input and allocates workspace memory, which is deallocated when the function ends. This function modifies the contents of matrix A and possibly vector b. For sizes of other matrices see text above.
A | is a reference to a dynamic matrix of size MaxN |
b | A vector of size Ma, of one of vctDynamicVector or vctDynamicVectorRef |
E | is a reference to a dynamic matrix of size MexN |
f | A vector of size Me, of one of vctDynamicVector or vctDynamicVectorRef |
G | is a reference to a dynamic matrix of size MgxN |
h | A vector of size Mg, of one of vctDynamicVector or vctDynamicVectorRef |
X | The output vector for LSqLin |
Work | The workspace for LAPACK. TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc |
|
inline |
Basic version of LSqLin where user provides the input matrix as well as storage for output. The LSqLin method verifies that the size of the solution objects matches the input and allocates workspace memory, which is deallocated when the function ends. This function modifies the contents of matrix A and possibly vector b. For sizes of other matrices see text above.
A | is a reference to a dynamic matrix of size MaxN |
b | A vector of size Ma, of one of vctDynamicVector or vctDynamicVectorRef |
E | is a reference to a dynamic matrix of size MexN |
f | A vector of size Me, of one of vctDynamicVector or vctDynamicVectorRef |
G | is a reference to a dynamic matrix of size MgxN |
h | A vector of size Mg, of one of vctDynamicVector or vctDynamicVectorRef |
X | The output vector for LSqLin TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |