General Purpose Geodetic Library
|
#include <SgUtMatrix.h>
Public Member Functions | |
SgUtMatrix () | |
SgUtMatrix (unsigned int N, bool IsNeedClear=true) | |
SgUtMatrix (const SgUtMatrix &R) | |
~SgUtMatrix () | |
unsigned int | n () const |
double & | operator() (unsigned int i, unsigned int j) |
double | getElement (unsigned int i, unsigned int j) const |
void | setElement (unsigned int i, unsigned int j, double d) |
void | clear () |
SgMatrix | T () const |
SgUtMatrix & | operator= (const SgUtMatrix &R) |
SgUtMatrix & | operator= (double d) |
SgUtMatrix & | operator+= (const SgUtMatrix &R) |
SgUtMatrix & | operator-= (const SgUtMatrix &R) |
SgUtMatrix & | operator*= (double d) |
SgUtMatrix & | operator/= (double d) |
double **& | base () |
const double *const * | base_c () const |
![]() | |
SgMatrix () | |
SgMatrix (unsigned int NRow, unsigned int NCol, bool IsNeedClear=true) | |
SgMatrix (const SgMatrix &M) | |
~SgMatrix () | |
unsigned int | nRow () const |
unsigned int | nCol () const |
double & | operator() (unsigned int i, unsigned int j) |
double | getElement (unsigned int i, unsigned int j) const |
void | setElement (unsigned int i, unsigned int j, double d) |
void | clear () |
SgMatrix | T () const |
SgMatrix & | operator= (const SgMatrix &M) |
SgMatrix & | operator= (double d) |
SgMatrix & | operator+= (const SgMatrix &M) |
SgMatrix & | operator-= (const SgMatrix &M) |
SgMatrix & | operator*= (double d) |
SgMatrix & | operator/= (double d) |
bool | operator== (const SgMatrix &M) const |
bool | operator!= (const SgMatrix &M) const |
double **& | base () |
const double *const * | base_c () const |
Friends | |
SgUtMatrix | operator- (const SgUtMatrix &R) |
SgUtMatrix | operator/ (const SgUtMatrix &R, double d) |
SgUtMatrix | operator* (const SgUtMatrix &R, double d) |
SgUtMatrix | operator* (double d, const SgUtMatrix &R) |
SgUtMatrix | operator+ (const SgUtMatrix &R1, const SgUtMatrix &R2) |
SgUtMatrix | operator- (const SgUtMatrix &R1, const SgUtMatrix &R2) |
SgVector | operator* (const SgUtMatrix &R, const SgVector &V) |
SgMatrix | calcProduct_mat_x_mat (const SgUtMatrix &R1, const SgMatrix &M2) |
SgUtMatrix | operator~ (const SgUtMatrix &R) |
Additional Inherited Members | |
![]() | |
unsigned int | NRow_ |
An number of rows in a matrix. More... | |
unsigned int | NCol_ |
An number of columns in a matrix. More... | |
double ** | B_ |
A pointer on a pointer of a first element of the matrix. More... | |
double | dTmp_ |
Local temporary variable. More... | |
An upper triangular matrix. SRIF uses it. ====================================================================================================
Definition at line 43 of file SgUtMatrix.h.
|
inline |
A constructor. Creates an empty vector (for I/O purposes or later assignments).
Definition at line 225 of file SgUtMatrix.h.
|
inline |
A constructor. Creates a copy of an object.
N | – number of elements in a row or column. |
IsNeedClear | – if set to TRUE fills the array with zeros, if set to "false" skips this procedure and the state of a matrix depends on compiler realization. |
Definition at line 234 of file SgUtMatrix.h.
References SgMatrix::B_, SgMatrix::dTmp_, SgMatrix::NCol_, and SgMatrix::NRow_.
|
inline |
A constructor. Creates a copy of an object.
M | – upper-triangular matrix that will be copied into the new object. |
Definition at line 252 of file SgUtMatrix.h.
References SgMatrix::B_, SgMatrix::dTmp_, SgMatrix::NCol_, and SgMatrix::NRow_.
|
inline |
A destructor. Frees allocated memory.
Definition at line 269 of file SgUtMatrix.h.
References SgMatrix::B_, SgMatrix::dTmp_, SgMatrix::NCol_, and SgMatrix::NRow_.
|
inline |
Definition at line 201 of file SgUtMatrix.h.
References SgMatrix::B_.
Referenced by SgEstimator::dataUpdate_th(), and SgEstimator::propagateStochasticParameters_th().
|
inline |
Definition at line 204 of file SgUtMatrix.h.
References SgMatrix::B_.
Referenced by SgEstimator::calcQForm().
|
inline |
Fills all elements with zero.
Definition at line 364 of file SgUtMatrix.h.
References SgMatrix::B_, and SgMatrix::NCol_.
|
inline |
Returns a value of (i,j)-th element. The matrix does not change.
i | – an index; valid ranges are: [0,N-1]. |
j | – an index; valid ranges are: [0,N-1]. |
Definition at line 318 of file SgUtMatrix.h.
References SgMatrix::B_, SgMatrix::NCol_, and SgMatrix::NRow_.
Referenced by SgEstimator::calcConditionNumber(), SgEstimator::calcQForm(), SgEstimator::calculateRRT(), SgEstimator::dataUpdate(), SgEstimator::insertNewParameters(), operator<<(), SgEstimator::propagateStochasticParameters(), SgEstimator::saveProcessedParameters(), SgEstimator::solveEquation(), and solveEquation().
|
inline |
Returns number of rows/columns in the matrix.
Definition at line 290 of file SgUtMatrix.h.
References SgMatrix::NRow_.
Referenced by SgEstimator::calcConditionNumber(), SgSolutionReporter::calculateConditionNumber(), and updateSolutionAtParameterList().
|
inline |
Returns a reference at (i,j)-th element of the matrix, so R(i,j)=x is working.
i | – an index; valid ranges are: [0,N-1]. |
j | – an index; valid ranges are: [i,N-1]. |
Definition at line 298 of file SgUtMatrix.h.
References SgMatrix::B_, SgMatrix::dTmp_, SgMatrix::NCol_, and SgMatrix::NRow_.
|
inline |
Multiplies the UT matrix by a scalar.
d | – a scale. |
Definition at line 448 of file SgUtMatrix.h.
References SgMatrix::B_, and SgMatrix::NCol_.
Referenced by SgSymMatrix::operator*=().
|
inline |
Increments the UT matrix by the another one.
R | – a matrix to add. |
Definition at line 400 of file SgUtMatrix.h.
References SgMatrix::B_, SgMatrix::NCol_, and SgMatrix::NRow_.
Referenced by SgSymMatrix::operator+=().
|
inline |
Decrements the UT matrix by the another one.
R | – a matrix to substract. |
Definition at line 424 of file SgUtMatrix.h.
References SgMatrix::B_, SgMatrix::NCol_, and SgMatrix::NRow_.
Referenced by SgSymMatrix::operator-=().
|
inline |
Divides the UT matrix by a scalar.
d | – a divider. |
Definition at line 461 of file SgUtMatrix.h.
References SgMatrix::B_, and SgMatrix::NCol_.
Referenced by SgSymMatrix::operator/=().
SgUtMatrix & SgUtMatrix::operator= | ( | const SgUtMatrix & | R | ) |
Assign a matrix to the another one.
R | – a matrix to copy. |
Definition at line 39 of file SgUtMatrix.cpp.
References SgMatrix::B_, SgMatrix::NCol_, and SgMatrix::NRow_.
Referenced by SgSymMatrix::operator=().
|
inline |
Fills the UT matrix with a double.
d | – a value to fill the matrix. |
Definition at line 387 of file SgUtMatrix.h.
References SgMatrix::B_, and SgMatrix::NCol_.
|
inline |
Changes the (i,j)-th element.
i | – an index; valid ranges are: [0,N-1]; |
j | – an index; valid ranges are: [i,N-1]; |
d | – a new value for (i,j)-th element. |
Definition at line 338 of file SgUtMatrix.h.
References SgMatrix::B_, SgMatrix::NCol_, and SgMatrix::NRow_.
Referenced by SgEstimator::dataUpdate(), SgEstimator::insertNewParameters(), SgEstimator::prepare2Run(), SgEstimator::propagateStochasticParameters(), and SgEstimator::saveProcessedParameters().
|
inline |
Returns transposed matrix (the original matrix doesn't change).
Definition at line 374 of file SgUtMatrix.h.
References SgMatrix::B_, SgMatrix::nCol(), SgMatrix::NCol_, SgMatrix::nRow(), SgMatrix::NRow_, and SgMatrix::setElement().
|
friend |
Definition at line 124 of file SgUtMatrix.cpp.
|
friend |
Makes a product of a matrix and a vector.
R | – a matrix; |
V | – a vector. |
Definition at line 69 of file SgUtMatrix.cpp.
|
friend |
Returns a matrix multiplied by a scalar.
R | – a matrix; |
d | – a scale. |
Definition at line 495 of file SgUtMatrix.h.
|
friend |
Returns a natrix multiplied by a scalar.
d | – a scale. |
R | – a matrix; |
Definition at line 503 of file SgUtMatrix.h.
|
friend |
Returns a sum of two UT matrices.
R1 | is a first term, |
R2 | is a second term in the sum. |
Definition at line 511 of file SgUtMatrix.h.
|
friend |
Returns a matrix with an inverted sign.
R | – an original matrix. |
Definition at line 479 of file SgUtMatrix.h.
|
friend |
Returns a difference of two matrices.
R1 | is a first term, |
R2 | is a second term in the sum. |
Definition at line 519 of file SgUtMatrix.h.
|
friend |
Returns a matrix divided by a scalar.
R | – a matrix; |
d | – a divider; |
Definition at line 487 of file SgUtMatrix.h.
|
friend |
Returns inversed matrix. This is time consumed operation, shouldn't use in ordinary operations. R*~R == ~R*R == E (original matrix doesn't change)..
Definition at line 90 of file SgUtMatrix.cpp.