General Purpose Geodetic Library
|
#include <SgMatrix.h>
Public Member Functions | |
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 |
Protected Attributes | |
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... | |
Friends | |
SgMatrix | operator- (const SgMatrix &M) |
SgMatrix | operator/ (const SgMatrix &M, double d) |
SgMatrix | operator* (const SgMatrix &M, double d) |
SgMatrix | operator* (double d, const SgMatrix &M) |
SgMatrix | operator+ (const SgMatrix &M1, const SgMatrix &M2) |
SgMatrix | operator- (const SgMatrix &M1, const SgMatrix &M2) |
SgVector | operator* (const SgMatrix &M, const SgVector &V) |
SgMatrix | calcProduct_mat_x_mat (const SgMatrix &M1, const SgMatrix &M2) |
SgMatrix | calcProduct_mat_x_mat (const SgUtMatrix &U1, const SgMatrix &M2) |
SgMatrix | calcProduct_mat_x_mat (const SgMatrix &M1, const SgSymMatrix &P2) |
SgMatrix | calcProduct_matT_x_mat (const SgMatrix &M1, const SgMatrix &M2) |
SgMatrix | calcProduct_mat_x_matT (const SgMatrix &M1, const SgMatrix &M2) |
SgVector | calcProduct_matT_x_vec (const SgMatrix &M, const SgVector &V) |
A matrix. Should be useful for various matrix calculations.
Definition at line 58 of file SgMatrix.h.
|
inline |
|
inline |
A constructor. Creates a copy of an object.
NRow | – number of rows. |
NCol | – number of columns. |
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 289 of file SgMatrix.h.
|
inline |
|
inline |
A destructor. Frees allocated memory.
Definition at line 332 of file SgMatrix.h.
|
inline |
Definition at line 247 of file SgMatrix.h.
References B_.
Referenced by SgEstimator::calcQForm(), SgEstimator::dataUpdate_th(), SgEstimator::prepare2Run(), and SgEstimator::propagateStochasticParameters_th().
|
inline |
|
inline |
Fills all elements with zero.
Definition at line 425 of file SgMatrix.h.
References B_, NCol_, and NRow_.
Referenced by SgVlbiSession::getDataFromVgosDb(), SgEstimator::propagateStochasticParameters(), and SgEstimator::propagateStochasticParameters_th().
|
inline |
Returns a value of (i,j)-th element.
i | – an index; valid ranges are: [0,N-1]. |
j | – an index; valid ranges are: [0,N-1]. |
Definition at line 385 of file SgMatrix.h.
References B_, NCol_, and NRow_.
Referenced by SgVlbiSession::allocPxyInterpolValues(), calcLhv(), SgPlotArea::calcLimits(), SgVlbiObservable::calcPhaseCalDelay(), SgEstimator::calcQForm(), SgSolutionReporter::calculateConditionNumber(), NsSessionEditDialog::changeNumOfAmbigSpacing4MarkedPoints(), NsSessionEditDialog::changeNumOfSubAmbig4MarkedPoints(), SgEstimator::dataUpdate(), SgPlotArea::drawData(), SgAgvDriver::fillBslnVars(), SgAgvDriver::fillSessVars(), SgPlotBranch::getDataAttr(), SgVlbiSession::getDataFromVgosDb(), operator<<(), SgPlotArea::output4Files(), SgVlbiSession::prepare4ErpInterpolation(), SgVlbiSession::processKombFile(), SgEstimator::propagateStochasticParameters(), SgVlbiSession::putDataIntoVgosDb(), SgPlot::queryData(), SgPlotArea::queryPoint(), SgCubicSpline::solveSpline(), SgCubicSpline::spline(), SgVgosDb::storeAntennaApriories(), SgVgosDb::storeCalcEop(), SgVgosDb::storeCalcInfo(), SgVgosDb::storeClockApriories(), SgVgosDb::storeEccentricities(), SgVgosDb::storeErpApriori(), SgVgosDb::storeObsCalFeedCorr(), SgVgosDb::storeObsCalIonGroup(), SgVgosDb::storeObsCalUnphase(), SgVgosDb::storeObsChannelInfo(), SgVgosDb::storeObsCorrelatorInfo(), SgVgosDb::storeObsEffFreqs(), SgVgosDb::storeObsGroupDelays(), SgVgosDb::storeObsPartBend(), SgVgosDb::storeObsPartEOP(), SgVgosDb::storeObsPartGamma(), SgVgosDb::storeObsPartNut2KXY(), SgVgosDb::storeObsPartParallax(), SgVgosDb::storeObsPartPoleTides(), SgVgosDb::storeObsPartRaDec(), SgVgosDb::storeObsPartXYZ(), SgVgosDb::storeObsPhase(), SgVgosDb::storeObsRates(), SgVgosDb::storeObsSingleBandDelays(), SgVgosDb::storeObsStd1Contribution(), SgVgosDb::storeObsStd2Contribution(), SgVgosDb::storeObsUVFperAsec(), SgVgosDb::storeScanEphemeris(), SgVgosDb::storeScanNutationEqx(), SgVgosDb::storeScanNutationEqxWahr(), SgVgosDb::storeScanNutationNro(), SgVgosDb::storeScanTrf2crf(), SgVgosDb::storeSolveWeights(), SgVgosDb::storeSourcesApriories(), SgVgosDb::storeStationAzEl(), SgVgosDb::storeStationCalAxisOffset(), SgVgosDb::storeStationCalCable(), SgVgosDb::storeStationCalOceanLoad(), SgVgosDb::storeStationCalSlantPathTropDry(), SgVgosDb::storeStationCalSlantPathTropWet(), SgVgosDb::storeStationOceanLdDisp(), SgVgosDb::storeStationPartAxisOffset(), SgVgosDb::storeStationPartHorizonGrad(), SgVgosDb::storeStationPartZenithDelayDry(), SgVgosDb::storeStationPartZenithDelayWet(), SgVgosDb::storeStationsApriories(), SgVgosDb::storeStationTsys(), SgEstimator::submittSolution2GlobalStore(), and NsTestDialog::testPlot().
|
inline |
Returns number of columns in the matrix.
Definition at line 360 of file SgMatrix.h.
References NCol_.
Referenced by SgPlotBranch::addDataAttr(), SgVlbiSession::allocPxyInterpolValues(), SgEstimator::calc_aT_P_a(), SgVlbiObservable::calcPhaseCalDelay(), SgEstimator::calcQForm(), SgEstimator::calculateRRT(), SgPlotBranch::delDataAttr(), SgPlotBranch::getDataAttr(), SgVlbiSession::getDataFromVgosDb(), operator<<(), SgModelsInfo::prepareUt1InterpData(), SgModelsInfo::prepareWobInterpData(), SgSolutionReporter::reportPall(), SgPlotBranch::setDataAttr(), SgVgosDb::storeCalcInfo(), SgVgosDb::storeObsEffFreqs(), SgVgosDb::storeObsGroupDelays(), SgVgosDb::storeObsPhase(), SgVgosDb::storeObsRates(), SgVgosDb::storeObsSingleBandDelays(), SgVgosDb::storeObsStd1Contribution(), SgVgosDb::storeObsStd2Contribution(), SgVgosDb::storeSolveWeights(), SgVgosDb::storeStationTsys(), SgUtMatrix::T(), and SgPlotBranch::xorDataAttr().
|
inline |
Returns number of rows in the matrix.
Definition at line 352 of file SgMatrix.h.
References NRow_.
Referenced by SgVlbiSession::allocPxyInterpolValues(), SgVlbiSession::allocUt1InterpolValues(), SgPlotArea::calcLimits(), SgEstimator::calcQForm(), SgEstimator::calculateRRT(), SgAgvDriver::fillSessVars(), SgVlbiSession::getDataFromVgosDb(), SgAgvDriver::initEssentialVars(), operator<<(), SgModelsInfo::prepareUt1InterpData(), SgModelsInfo::prepareWobInterpData(), VcCalc2SessionIfc::put4_ut1Epoch(), VcCalc2SessionIfc::put4_wobEpoch(), SgVlbiSession::putDataIntoVgosDb(), SgSolutionReporter::reportPall(), SgEstimator::solveEquation(), solveEquation(), SgVgosDb::storeAntennaApriories(), SgVgosDb::storeCalcEop(), SgVgosDb::storeCalcInfo(), SgVgosDb::storeClockApriories(), SgVgosDb::storeErpApriori(), SgVgosDb::storeObsCalFeedCorr(), SgVgosDb::storeObsCalUnphase(), SgVgosDb::storeObsEffFreqs(), SgVgosDb::storeObsGroupDelays(), SgVgosDb::storeObsPartBend(), SgVgosDb::storeObsPartEOP(), SgVgosDb::storeObsPartGamma(), SgVgosDb::storeObsPartNut2KXY(), SgVgosDb::storeObsPartParallax(), SgVgosDb::storeObsPartPoleTides(), SgVgosDb::storeObsPartRaDec(), SgVgosDb::storeObsPartXYZ(), SgVgosDb::storeObsPhase(), SgVgosDb::storeObsPhaseCalInfo(), SgVgosDb::storeObsRates(), SgVgosDb::storeObsSingleBandDelays(), SgVgosDb::storeObsStd1Contribution(), SgVgosDb::storeObsStd2Contribution(), SgVgosDb::storeObsUVFperAsec(), SgVgosDb::storeScanEphemeris(), SgVgosDb::storeScanNutationEqx(), SgVgosDb::storeScanNutationEqxWahr(), SgVgosDb::storeScanNutationNro(), SgVgosDb::storeScanTrf2crf(), SgVgosDb::storeSourcesApriories(), SgVgosDb::storeStationAzEl(), SgVgosDb::storeStationCalAxisOffset(), SgVgosDb::storeStationCalCable(), SgVgosDb::storeStationCalOceanLoad(), SgVgosDb::storeStationCalSlantPathTropDry(), SgVgosDb::storeStationCalSlantPathTropWet(), SgVgosDb::storeStationOceanLdDisp(), SgVgosDb::storeStationPartAxisOffset(), SgVgosDb::storeStationPartHorizonGrad(), SgVgosDb::storeStationPartZenithDelayDry(), SgVgosDb::storeStationPartZenithDelayWet(), SgVgosDb::storeStationsApriories(), SgVgosDb::storeStationTsys(), SgUtMatrix::T(), and NsTestDialog::testPlot().
|
inline |
Comperes the matrix with another one, returns TRUE if the matrices are different.
M | – a matrix for comparing. |
Definition at line 530 of file SgMatrix.h.
|
inline |
|
inline |
Multiplies the matrix by a scalar.
d | – a scale. |
Definition at line 474 of file SgMatrix.h.
Increments the matrix by another one.
M | – a matrix to add. |
Definition at line 448 of file SgMatrix.h.
Decrements the matrix by another one.
M | – a matrix to substract. |
Definition at line 461 of file SgMatrix.h.
|
inline |
Assign the matrix to the another one.
M | – a matrix to copy. |
Definition at line 39 of file SgMatrix.cpp.
|
inline |
Fills the matrix with a double.
d | – a value to fill the matrix. |
Definition at line 435 of file SgMatrix.h.
|
inline |
Compares the matrix with another one, returns TRUE if the matrices are equal.
M | – a matrix for comparing. |
Definition at line 514 of file SgMatrix.h.
|
inline |
Changes the (i,j)-th element.
i | – an index; valid ranges are: [0,N-1]; |
j | – an index; valid ranges are: [0,N-1]; |
d | – a new value for (i,j)-th element. |
Definition at line 402 of file SgMatrix.h.
References B_, NCol_, and NRow_.
Referenced by SgPlotBranch::addDataAttr(), SgVlbiSession::allocPxyInterpolValues(), SgVlbiSession::allocUt1InterpolValues(), NsSessionEditDialog::calcIono(), calcLhv(), SgSolutionReporter::calculateConditionNumber(), NsSessionEditDialog::changeNumOfAmbigSpacing4MarkedPoints(), NsSessionEditDialog::changeNumOfSubAmbig4MarkedPoints(), SgPlotBranch::delDataAttr(), SgVlbiSession::getDataFromDbhImage(), SgVlbiSession::getDataFromVgosDb(), SgAgvDriver::initSession(), SgVgosDb::loadAntennaApriories(), SgVgosDb::loadCalcEop(), SgVgosDb::loadCalcInfo(), SgVgosDb::loadClockApriories(), SgVgosDb::loadEccentricities(), SgVgosDb::loadErpApriori(), SgVgosDb::loadObsCalFeedCorr(), SgVgosDb::loadObsCalHiFyErp(), SgVgosDb::loadObsCalHiFyLibration(), SgVgosDb::loadObsCalIonGroup(), SgVgosDb::loadObsCalUnphase(), SgVgosDb::loadObsCalWobble(), SgVgosDb::loadObsChannelInfoMk3(), SgVgosDb::loadObsChannelInfoMk4(), SgVgosDb::loadObsChannelInfoS2(), SgVgosDb::loadObsCorrelatorInfoCrl(), SgVgosDb::loadObsCorrelatorInfoMk4(), SgVgosDb::loadObsEffFreqs(), SgVgosDb::loadObsGroupDelays(), SgVgosDb::loadObsPartBend(), SgVgosDb::loadObsPartEOP(), SgVgosDb::loadObsPartGamma(), SgVgosDb::loadObsPartNut2KXY(), SgVgosDb::loadObsPartParallax(), SgVgosDb::loadObsPartPoleTides(), SgVgosDb::loadObsPartRaDec(), SgVgosDb::loadObsPartXYZ(), SgVgosDb::loadObsPhase(), SgVgosDb::loadObsPhaseCalInfoMk3(), SgVgosDb::loadObsPhaseCalInfoMk4(), SgVgosDb::loadObsPhaseCalInfoS2(), SgVgosDb::loadObsRates(), SgVgosDb::loadObsSingleBandDelays(), SgVgosDb::loadObsUserCorrections(), SgVgosDb::loadObsUVFperAsec(), SgVgosDb::loadScanEphemeris(), SgVgosDb::loadScanNutationEqx(), SgVgosDb::loadScanNutationEqxWahr(), SgVgosDb::loadScanNutationNro(), SgVgosDb::loadScanTrf2crf(), SgVgosDb::loadSolveWeights(), SgVgosDb::loadSourcesApriories(), SgVgosDb::loadStationAzEl(), SgVgosDb::loadStationCalOceanLoad(), SgVgosDb::loadStationOceanLdDisp(), SgVgosDb::loadStationPartAxisOffset(), SgVgosDb::loadStationPartHorizonGrad(), SgVgosDb::loadStationPartZenithDelayDry(), SgVgosDb::loadStationPartZenithDelayWet(), SgVgosDb::loadStationsApriories(), SgVgosDb::loadStationTsys(), SgVgosDb::loadStdObsCalibration(), SgVlbiSession::prepare4ErpInterpolation(), SgEstimator::processConstraint(), SgVlbiSession::processKombFile(), SgEstimator::processObs(), SgEstimator::propagateStochasticParameters(), SgEstimator::propagateStochasticParameters_th(), VcCalc2SessionIfc::put4_fWobXnYt(), VcCalc2SessionIfc::put4_ut1Epoch(), VcCalc2SessionIfc::put4_wobEpoch(), SgVlbiSession::putDataIntoVgosDb(), SgExternalEopFile::readC04File(), SgExternalEopFile::readErpFile(), SgExternalEopFile::readFinalsFile(), SgSolutionReporter::reportBaselineVariationsBlock_Output4Spoolfile(), SgEstimator::saveProcessedParameters(), SgPlotBranch::setDataAttr(), SgUtMatrix::T(), NsSessionEditDialog::tab4BandPlots(), NsSessionEditDialog::tab4SessionPlot(), NsSessionEditDialog::tab4StationsPlot(), NsTestDialog::testPlot(), NsTestFour1Dialog::testPlot(), NsSessionEditDialog::updateResiduals(), NsSessionEditDialog::updateSessionWideSolutions(), SgPlotBranch::xorDataAttr(), and NsSessionEditDialog::zeroIono().
|
inline |
Returns transposed matrix (original matrix doesn't changed).
Definition at line 500 of file SgMatrix.h.
Makes a product of two matrices.
M1 | – a first term in the product; |
M2 | – a second term in the product. |
Definition at line 94 of file SgMatrix.cpp.
|
friend |
Definition at line 73 of file SgSymMatrix.cpp.
|
friend |
Definition at line 124 of file SgUtMatrix.cpp.
Makes a product of a matrix and a transposed matrix, i.e., M1*M2^T.
M1 | – a matrix, the first term in the product, |
M2 | – a matrix that should be transposed. |
Definition at line 165 of file SgMatrix.cpp.
Makes a product of a transposed matrix and a matrix, i.e., M1^T*M2.
M1 | – a matrix that should be transposed; |
M2 | – a matrix, the second term in the product. |
Definition at line 131 of file SgMatrix.cpp.
Makes a product of a transposed matrix and a vector.
M | – a that should be transposed; |
V | – a vector. |
Definition at line 192 of file SgMatrix.cpp.
Makes a product of a matrix and a vector.
M | – a matrix; |
V | – a vector. |
Definition at line 73 of file SgMatrix.cpp.
Returns a matrix multiplied by a scalar.
M | – a matrix; |
d | – a scale. |
Definition at line 559 of file SgMatrix.h.
Returns a natrix multiplied by a scalar.
d | – a scale. |
M | – a matrix; |
Definition at line 567 of file SgMatrix.h.
Returns a sum of two matrices.
M1 | is a first term, |
M2 | is a second term in the sum. |
Definition at line 575 of file SgMatrix.h.
Returns a matrix with an inverted sign.
M | – an original matrix. |
Definition at line 543 of file SgMatrix.h.
Returns a difference of two matrices.
M1 | is a first term, |
M2 | is a second term in the sum. |
Definition at line 583 of file SgMatrix.h.
Returns a matrix divided by a scalar.
M | – a matrix; |
d | – a divider; |
Definition at line 551 of file SgMatrix.h.
|
protected |
A pointer on a pointer of a first element of the matrix.
Definition at line 261 of file SgMatrix.h.
Referenced by SgMatrix(), SgUtMatrix::SgUtMatrix(), ~SgMatrix(), SgUtMatrix::~SgUtMatrix(), base(), SgSymMatrix::base(), SgUtMatrix::base(), base_c(), SgSymMatrix::base_c(), SgUtMatrix::base_c(), clear(), SgUtMatrix::clear(), getElement(), SgSymMatrix::getElement(), SgUtMatrix::getElement(), operator()(), SgSymMatrix::operator()(), SgUtMatrix::operator()(), operator*=(), SgUtMatrix::operator*=(), operator+=(), SgUtMatrix::operator+=(), operator-=(), SgUtMatrix::operator-=(), operator/=(), SgUtMatrix::operator/=(), operator=(), SgUtMatrix::operator=(), operator==(), setElement(), SgSymMatrix::setElement(), SgUtMatrix::setElement(), T(), and SgUtMatrix::T().
|
protected |
Local temporary variable.
Definition at line 262 of file SgMatrix.h.
Referenced by SgMatrix(), SgUtMatrix::SgUtMatrix(), SgUtMatrix::~SgUtMatrix(), operator()(), SgSymMatrix::operator()(), and SgUtMatrix::operator()().
|
protected |
An number of columns in a matrix.
Definition at line 260 of file SgMatrix.h.
Referenced by SgMatrix(), SgUtMatrix::SgUtMatrix(), ~SgMatrix(), SgUtMatrix::~SgUtMatrix(), clear(), SgUtMatrix::clear(), getElement(), SgSymMatrix::getElement(), SgUtMatrix::getElement(), nCol(), operator()(), SgSymMatrix::operator()(), SgUtMatrix::operator()(), operator*=(), SgUtMatrix::operator*=(), operator+=(), SgUtMatrix::operator+=(), operator-=(), SgUtMatrix::operator-=(), operator/=(), SgUtMatrix::operator/=(), operator=(), SgUtMatrix::operator=(), operator==(), setElement(), SgSymMatrix::setElement(), SgUtMatrix::setElement(), T(), and SgUtMatrix::T().
|
protected |
An number of rows in a matrix.
Definition at line 259 of file SgMatrix.h.
Referenced by SgMatrix(), SgUtMatrix::SgUtMatrix(), ~SgMatrix(), SgUtMatrix::~SgUtMatrix(), clear(), getElement(), SgSymMatrix::getElement(), SgUtMatrix::getElement(), SgUtMatrix::n(), nRow(), operator()(), SgSymMatrix::operator()(), SgUtMatrix::operator()(), operator*=(), operator+=(), SgUtMatrix::operator+=(), operator-=(), SgUtMatrix::operator-=(), operator/=(), operator=(), SgUtMatrix::operator=(), operator==(), setElement(), SgSymMatrix::setElement(), SgUtMatrix::setElement(), T(), and SgUtMatrix::T().