96 CISSTNETLIB_INTEGER
M;
97 CISSTNETLIB_INTEGER
N;
99 CISSTNETLIB_INTEGER
Lda;
133 nmrLSSolver(CISSTNETLIB_INTEGER m, CISSTNETLIB_INTEGER n, CISSTNETLIB_INTEGER nrhs,
bool storageOrder) {
159 inline void Allocate(CISSTNETLIB_INTEGER m, CISSTNETLIB_INTEGER n, CISSTNETLIB_INTEGER nrhs,
bool storageOrder) {
160 const CISSTNETLIB_INTEGER one = 1;
165 Lda = std::max(one,
M);
166 Ldb = std::max(one, std::max(
M,
N));
167 CISSTNETLIB_INTEGER MN = std::min(
M,
N);
168 Lwork = std::max (one, MN + std::max (MN,
NRHS));
180 Allocate(A.rows(), A.cols(), B.cols(), A.IsRowMajor());
190 template <
class _matrixOwnerType>
194 cmnThrow(std::runtime_error(
"nmrLSSolver Solve: Storage order used for Allocate was different"));
197 cmnThrow(std::runtime_error(
"nmrLSSolver Solve: Storage order used for Allocate was different"));
203 if (A.IsColMajor()) {
204 if ((
M !=
static_cast<CISSTNETLIB_INTEGER
>(A.rows())) || (
N !=
static_cast<CISSTNETLIB_INTEGER
>(A.cols()))) {
205 cmnThrow(std::runtime_error(
"nmrLSSolver Solve: Size used for Allocate was different"));
208 if (B.IsColMajor()) {
209 if ((
M !=
static_cast<CISSTNETLIB_INTEGER
>(B.rows())) || (
NRHS !=
static_cast<CISSTNETLIB_INTEGER
>(B.cols()))) {
210 cmnThrow(std::runtime_error(
"nmrLSSolver Solve: Size used for Allocate was different"));
215 if (! A.IsCompact()) {
216 cmnThrow(std::runtime_error(
"nmrLSSolver Solve: Requires a compact matrix"));
218 if (! B.IsCompact()) {
219 cmnThrow(std::runtime_error(
"nmrLSSolver Solve: Requires a compact matrix"));
223#if defined(CISSTNETLIB_VERSION_MAJOR)
224#if (CISSTNETLIB_VERSION_MAJOR >= 3)
CISSTNETLIB_INTEGER NRHS
Definition nmrLSSolver.h:98
CISSTNETLIB_INTEGER N
Definition nmrLSSolver.h:97
void Allocate(CISSTNETLIB_INTEGER m, CISSTNETLIB_INTEGER n, CISSTNETLIB_INTEGER nrhs, bool storageOrder)
Definition nmrLSSolver.h:159
CISSTNETLIB_INTEGER Ldb
Definition nmrLSSolver.h:100
nmrLSSolver(void)
Definition nmrLSSolver.h:112
nmrLSSolver(vctDynamicMatrix< double > &A, vctDynamicMatrix< double > &B)
Definition nmrLSSolver.h:144
void Solve(vctDynamicMatrixBase< _matrixOwnerType, double > &A, vctDynamicMatrixBase< _matrixOwnerType, double > &B) CISST_THROW(std
Definition nmrLSSolver.h:191
CISSTNETLIB_INTEGER Lwork
Definition nmrLSSolver.h:101
vctDynamicMatrix< double > Work
Definition nmrLSSolver.h:103
char Trans
Definition nmrLSSolver.h:102
void Allocate(vctDynamicMatrix< double > &A, vctDynamicMatrix< double > &B)
Definition nmrLSSolver.h:179
CISSTNETLIB_INTEGER Info
Definition nmrLSSolver.h:104
bool StorageOrder
Definition nmrLSSolver.h:105
CISSTNETLIB_INTEGER M
Definition nmrLSSolver.h:96
CISSTNETLIB_INTEGER Lda
Definition nmrLSSolver.h:99
nmrLSSolver(CISSTNETLIB_INTEGER m, CISSTNETLIB_INTEGER n, CISSTNETLIB_INTEGER nrhs, bool storageOrder)
Definition nmrLSSolver.h:133
Definition vctDynamicMatrixBase.h:43
Definition vctForwardDeclarations.h:157
#define CISST_THROW(exceptionParameter)
Somewhat portable compilation warning message. This works with very recent versions of gcc (4....
Definition cmnPortability.h:559
void cmnThrow(const _exceptionType &except, cmnLogLevel lod=CMN_LOG_LEVEL_INIT_ERROR)
Definition cmnThrow.h:76
Declaration of vctDynamicMatrix.
const bool VCT_COL_MAJOR
Definition vctForwardDeclarations.h:44