cisst-saw
Toggle main menu visibility
Loading...
Searching...
No Matches
tmp
cisst-saw
cisst
cisstNumerical
nmrLSMinNorm.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4
/*
5
$Id: nmrLSMinNorm.h 4267 2013-06-11 14:01:21Z sleonar7 $
6
7
Author(s): Simon Leonard
8
Created on: 2013-06-11
9
10
(C) Copyright 2004-2007 Johns Hopkins University (JHU), All Rights
11
Reserved.
12
13
--- begin cisst license - do not edit ---
14
15
This software is provided "as is" under an open source license, with
16
no warranty. The complete license can be found in license.txt and
17
http://www.cisst.org/cisst/license.txt.
18
19
--- end cisst license ---
20
*/
21
22
#ifndef _nmrLSMinNorm_h
23
#define _nmrLSMinNorm_h
24
25
#include <
cisstNumerical/nmrNetlib.h
>
26
#include <
cisstVector/vctDynamicMatrix.h
>
27
28
#include <
cisstNumerical/nmrExport.h
>
29
30
class
nmrLSMinNorm
{
31
32
public
:
33
34
class
Data
{
35
36
public
:
37
38
CISSTNETLIB_INTEGER
M
;
// number of rows of matrix A
39
CISSTNETLIB_INTEGER
N
;
// number of columns of matrix A
40
CISSTNETLIB_INTEGER
NRHS
;
// number of right hand side vectors (columns of b)
41
42
CISSTNETLIB_INTEGER
LDA
;
// lead dimension of matrix A (column stride)
43
CISSTNETLIB_INTEGER
LDB
;
// lead dimension of matrix B (column stride)
44
// LDB = max( M, N )
45
46
CISSTNETLIB_DOUBLE*
S
;
// vector of singular values
47
CISSTNETLIB_DOUBLE
RCOND
;
// used to determine the effective rank of A
48
CISSTNETLIB_INTEGER
RANK
;
// effective rank of A
49
50
CISSTNETLIB_DOUBLE*
WORK
;
// work space
51
CISSTNETLIB_INTEGER
LWORK
;
// size of work space (determined by dgless)
52
53
CISSTNETLIB_INTEGER
INFO
;
// error number
54
55
// if A is underdetermined, we need to reallocate b to a LDBxNRHS matrix
56
// and copy b into the upper MxNRHS block
57
bool
underdetermined
;
58
vctDynamicMatrix<double>
B
;
59
60
Data
();
61
62
// fill in the values
63
Data
(
const
vctDynamicMatrix<double>
& A,
64
const
vctDynamicMatrix<double>
& b,
65
double
rcond = -1 );
66
67
~Data
();
68
69
void
CheckSystem
(
const
vctDynamicMatrix<double>
& A,
70
const
vctDynamicMatrix<double>
& b )
const
;
71
72
void
CheckInfo
()
const
;
73
74
};
75
76
};
77
79
92
vctDynamicMatrix<double>
CISST_EXPORT
nmrLSMinNorm
(
vctDynamicMatrix<double>
& A,
93
vctDynamicMatrix<double>
& b,
94
CISSTNETLIB_DOUBLE r = -1.0);
95
97
112
vctDynamicMatrix<double>
CISST_EXPORT
nmrLSMinNorm
(
vctDynamicMatrix<double>
& A,
113
vctDynamicMatrix<double>
& b,
114
nmrLSMinNorm::Data
& data,
115
CISSTNETLIB_DOUBLE r = -1.0);
116
117
#endif
nmrLSMinNorm::Data
Definition
nmrLSMinNorm.h:34
nmrLSMinNorm::Data::INFO
CISSTNETLIB_INTEGER INFO
Definition
nmrLSMinNorm.h:53
nmrLSMinNorm::Data::WORK
CISSTNETLIB_DOUBLE * WORK
Definition
nmrLSMinNorm.h:50
nmrLSMinNorm::Data::B
vctDynamicMatrix< double > B
Definition
nmrLSMinNorm.h:58
nmrLSMinNorm::Data::RCOND
CISSTNETLIB_DOUBLE RCOND
Definition
nmrLSMinNorm.h:47
nmrLSMinNorm::Data::NRHS
CISSTNETLIB_INTEGER NRHS
Definition
nmrLSMinNorm.h:40
nmrLSMinNorm::Data::LWORK
CISSTNETLIB_INTEGER LWORK
Definition
nmrLSMinNorm.h:51
nmrLSMinNorm::Data::CheckInfo
void CheckInfo() const
nmrLSMinNorm::Data::Data
Data(const vctDynamicMatrix< double > &A, const vctDynamicMatrix< double > &b, double rcond=-1)
nmrLSMinNorm::Data::~Data
~Data()
nmrLSMinNorm::Data::N
CISSTNETLIB_INTEGER N
Definition
nmrLSMinNorm.h:39
nmrLSMinNorm::Data::LDB
CISSTNETLIB_INTEGER LDB
Definition
nmrLSMinNorm.h:43
nmrLSMinNorm::Data::underdetermined
bool underdetermined
Definition
nmrLSMinNorm.h:57
nmrLSMinNorm::Data::LDA
CISSTNETLIB_INTEGER LDA
Definition
nmrLSMinNorm.h:42
nmrLSMinNorm::Data::Data
Data()
nmrLSMinNorm::Data::RANK
CISSTNETLIB_INTEGER RANK
Definition
nmrLSMinNorm.h:48
nmrLSMinNorm::Data::M
CISSTNETLIB_INTEGER M
Definition
nmrLSMinNorm.h:38
nmrLSMinNorm::Data::CheckSystem
void CheckSystem(const vctDynamicMatrix< double > &A, const vctDynamicMatrix< double > &b) const
nmrLSMinNorm::Data::S
CISSTNETLIB_DOUBLE * S
Definition
nmrLSMinNorm.h:46
nmrLSMinNorm
Definition
nmrLSMinNorm.h:30
vctDynamicMatrix
Definition
vctForwardDeclarations.h:157
CISST_EXPORT
#define CISST_EXPORT
Definition
cmnExportMacros.h:50
nmrExport.h
Rules of exporting.
nmrNetlib.h
vctDynamicMatrix.h
Declaration of vctDynamicMatrix.
Generated by
1.18.0