cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
nmrLSqLin.h File Reference

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)
 

Detailed Description

Declaration of nmrLSqLin.

Function Documentation

template<typename _matrixOwnerType , typename _vectorOwnerType >
CISSTNETLIB_INTEGER nmrLSqLin ( vctDynamicMatrixBase< _matrixOwnerType, CISSTNETLIB_DOUBLE > &  A,
vctDynamicVectorBase< _vectorOwnerType, CISSTNETLIB_DOUBLE > &  b,
nmrLSqLinSolutionDynamic solution 
)
throw (std::runtime_error
)
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.

Parameters
AA matrix of size MxN, of one of vctDynamicMatrix or vctDynamicMatrixRef
bA vector of size N, of one of vctDynamicVector or vctDynamicVectorRef
solutionA solution object of one of the types corresponding to input matrix TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajor nmrLSqLinSolverTest::TestDynamicRowMajor nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc
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
)
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.

Parameters
AA matrix of size MxN, of one of vctDynamicMatrix or vctDynamicMatrixRef
bA vector of size N, of one of vctDynamicVector or vctDynamicVectorRef
Gis a reference to a dynamic matrix of size McxN
hA vector of size N, of one of vctDynamicVector or vctDynamicVectorRef
solutionA solution object of one of the types corresponding to input matrix TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajor nmrLSqLinSolverTest::TestDynamicRowMajor nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc
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
)
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.

Parameters
Ais a reference to a dynamic matrix of size MaxN
bA vector of size Ma, of one of vctDynamicVector or vctDynamicVectorRef
Eis a reference to a dynamic matrix of size MexN
fA vector of size Me, of one of vctDynamicVector or vctDynamicVectorRef
Gis a reference to a dynamic matrix of size MgxN
hA vector of size Mg, of one of vctDynamicVector or vctDynamicVectorRef
XThe output vector for LSqLin
WorkThe workspace for LAPACK. TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajor nmrLSqLinSolverTest::TestDynamicRowMajor nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc
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 
)
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.

Parameters
Ais a reference to a dynamic matrix of size MxN
bA vector of size N, of one of vctDynamicVector or vctDynamicVectorRef
XThe output vector for LSqLin
WorkThe workspace for LAPACK. TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc
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 
)
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.

Parameters
Ais a reference to a dynamic matrix of size MxN
bA vector of size N, of one of vctDynamicVector or vctDynamicVectorRef
XThe output vector for LSqLin TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc
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 
)
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.

Parameters
Ais a reference to a dynamic matrix of size MaxN
bA vector of size Ma, of one of vctDynamicVector or vctDynamicVectorRef
Gis a reference to a dynamic matrix of size MgxN
hA vector of size Mg, of one of vctDynamicVector or vctDynamicVectorRef
XThe output vector for LSqLin
WorkThe workspace for LAPACK. TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc
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 
)
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.

Parameters
Ais a reference to a dynamic matrix of size MaxN
bA vector of size Ma, of one of vctDynamicVector or vctDynamicVectorRef
Gis a reference to a dynamic matrix of size MgxN
hA vector of size Mg, of one of vctDynamicVector or vctDynamicVectorRef
XThe output vector for LSqLin TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc
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 
)
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.

Parameters
Ais a reference to a dynamic matrix of size MaxN
bA vector of size Ma, of one of vctDynamicVector or vctDynamicVectorRef
Eis a reference to a dynamic matrix of size MexN
fA vector of size Me, of one of vctDynamicVector or vctDynamicVectorRef
Gis a reference to a dynamic matrix of size MgxN
hA vector of size Mg, of one of vctDynamicVector or vctDynamicVectorRef
XThe output vector for LSqLin
WorkThe workspace for LAPACK. TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc
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 
)
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.

Parameters
Ais a reference to a dynamic matrix of size MaxN
bA vector of size Ma, of one of vctDynamicVector or vctDynamicVectorRef
Eis a reference to a dynamic matrix of size MexN
fA vector of size Me, of one of vctDynamicVector or vctDynamicVectorRef
Gis a reference to a dynamic matrix of size MgxN
hA vector of size Mg, of one of vctDynamicVector or vctDynamicVectorRef
XThe output vector for LSqLin TESTS: nmrLSqLinSolverTest::TestDynamicColumnMajorUserAlloc nmrLSqLinSolverTest::TestDynamicRowMajorUserAlloc
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 
)
inline
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 
)
inline
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 
)
inline
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 
)
inline
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 
)
inline
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 
)
inline
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 
)
inline
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 
)
inline
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 
)
inline