General Purpose Geodetic Library
SgVector Class Reference

#include <SgVector.h>

Public Member Functions

 SgVector ()
 
 SgVector (unsigned int N, bool IsNeedClear)
 
 SgVector (const SgVector &V)
 
 ~SgVector ()
 
void reSize (unsigned int n)
 
unsigned int n () const
 
double & operator() (unsigned int i)
 
void setElement (unsigned int i, double d)
 
double getElement (unsigned int i) const
 
double module () const
 
void clear ()
 
SgVectoroperator= (const SgVector &V)
 
SgVectoroperator= (double d)
 
SgVectoroperator+= (const SgVector &V)
 
SgVectoroperator-= (const SgVector &V)
 
SgVectoroperator*= (double d)
 
SgVectoroperator/= (double d)
 
bool operator== (const SgVector &V) const
 
bool operator!= (const SgVector &V) const
 
double *& base ()
 
const double * base_c () const
 

Protected Attributes

unsigned int N_
 An number of elements in a vector (dimension). More...
 
double * B_
 A pointer on a first element of the vector. More...
 

Friends

class SgMatrix
 
class SgUtMatrix
 
SgVector operator- (const SgVector &V)
 
SgVector operator/ (const SgVector &V, double d)
 
SgVector operator* (const SgVector &V, double d)
 
SgVector operator* (double d, const SgVector &V)
 
SgVector operator+ (const SgVector &V1, const SgVector &V2)
 
SgVector operator- (const SgVector &V1, const SgVector &V2)
 
double operator* (const SgVector &V1, const SgVector &V2)
 
SgVector operator* (const SgMatrix &M, const SgVector &V)
 
SgVector operator* (const SgUtMatrix &R, const SgVector &V)
 
SgVector operator* (const SgSymMatrix &P, const SgVector &V)
 
SgVector calcProduct_matT_x_vec (const SgMatrix &, const SgVector &)
 
SgVector calcProduct_matT_x_vec (const SgUtMatrix &, const SgVector &)
 

Detailed Description

A vector. Should be useful for various matrix calculations.

Definition at line 62 of file SgVector.h.

Constructor & Destructor Documentation

◆ SgVector() [1/3]

SgVector::SgVector ( )
inline

A constructor. Creates an empty vector (for I/O purposes).

Definition at line 274 of file SgVector.h.

References B_, and N_.

◆ SgVector() [2/3]

SgVector::SgVector ( unsigned int  N,
bool  IsNeedClear = true 
)
inline

A constructor. Creates a copy of an object.

Parameters
N– number of elements.
IsNeedClear– if set to true fills the array with zeros, if set to false skips this procedure and the state of *B depend on compiler realization.

Definition at line 283 of file SgVector.h.

References B_, clear(), and N_.

◆ SgVector() [3/3]

SgVector::SgVector ( const SgVector V)
inline

A constructor. Creates a copy of an object.

Parameters
V– vector that will be copied into the new object.

Definition at line 293 of file SgVector.h.

References B_, and N_.

◆ ~SgVector()

SgVector::~SgVector ( )
inline

A destructor. Frees allocated memory.

Definition at line 302 of file SgVector.h.

References B_, and N_.

Member Function Documentation

◆ base()

double* & SgVector::base ( )
inline

◆ base_c()

const double* SgVector::base_c ( ) const
inline

Definition at line 248 of file SgVector.h.

References B_.

◆ clear()

void SgVector::clear ( )
inline

◆ getElement()

double SgVector::getElement ( unsigned int  i) const
inline

Returns a value of i-th element.

Parameters
i– an index; valid ranges are: [0,N-1].

Definition at line 362 of file SgVector.h.

References B_, and N_.

Referenced by SgVlbiSession::allocUt1InterpolValues(), SgArcStorage::calc_aT_P_a(), SgPwlStorageBSplineL::calc_aT_P_a(), SgPwlStorageBSplineQ::calc_aT_P_a(), SgPwlStorageIncRates::calc_aT_P_a(), SgEstimator::calc_aT_P_a_opt(), SgSolutionReporter::calculateConditionNumber(), SgStnLogReadings::cleanMeteoParameters(), SgEstimator::dataUpdate(), evaluateEffectiveFreqs(), evaluateEffectiveFreqs_old_version(), evaluatePCal4GrpDelay(), evaluatePhaseCals(), SgAgvDriver::fillBslnVars(), SgAgvDriver::fillSessVars(), SgVlbiSession::getDataFromVgosDb(), SgVlbiAuxObservation::getTsys(), SgCubicSpline::h(), SgEstimator::insertNewParameters(), operator<<(), SgVlbiObservation::prepare4Analysis(), SgVlbiSession::prepare4ErpInterpolation(), SgCubicSpline::prepare4Spline(), SgEstimator::processObs(), SgEstimator::propagateStochasticParameters(), SgVlbiSession::putDataIntoVgosDb(), SgEstimator::saveProcessedParameters(), SgVlbiBaselineInfo::scan4Ambiguities_m1(), SgEstimator::solveEquation(), solveEquation(), SgCubicSpline::solveSpline(), SgCubicSpline::spline(), SgVgosDb::storeAntennaApriories(), SgVgosDb::storeAtmSetup(), SgVgosDb::storeCalcEop(), SgVgosDb::storeClockSetup(), SgVgosDb::storeErpApriori(), SgVgosDb::storeObsAmbigSpacing(), SgVgosDb::storeObsChannelInfo(), SgVgosDb::storeObsCorrelation(), SgVgosDb::storeObsCorrelatorInfo(), SgVgosDb::storeObsDelayTheoretical(), SgVgosDb::storeObsDtec(), SgVgosDb::storeObsFractC(), SgVgosDb::storeObsGroupDelaysFull(), SgVgosDb::storeObsPhaseCalInfo(), SgVgosDb::storeObsPhaseDelaysFull(), SgVgosDb::storeObsRateTheoretical(), SgVgosDb::storeObsRefFreqs(), SgVgosDb::storeObsSNR(), SgVgosDb::storeStationMet(), SgVgosDb::storeStationParAngle(), SgVgosDb::storeStationRefClockOffset(), NsSessionEditDialog::tab4StationsPlot(), NsTestDialog::testPlot(), NsTestFour1Dialog::testPlot(), and updateSolutionAtParameterList().

◆ module()

double SgVector::module ( ) const
inline

Returns a length of the vector.

Definition at line 378 of file SgVector.h.

References B_, and N_.

◆ n()

◆ operator!=()

bool SgVector::operator!= ( const SgVector V) const
inline

Comperes the vector with another one, returns TRUE if the vectors are different.

Parameters
V– a vector for comparing.

Definition at line 498 of file SgVector.h.

◆ operator()()

double & SgVector::operator() ( unsigned int  i)
inline

Returns reference at i-th element of the vector.

Parameters
i– an index; valid ranges are: [0,N-1].

Definition at line 335 of file SgVector.h.

References B_, and N_.

◆ operator*=()

SgVector & SgVector::operator*= ( double  d)
inline

Multiplies vector by scalar.

Parameters
d– a scale.

Definition at line 461 of file SgVector.h.

References B_, and N_.

◆ operator+=()

SgVector & SgVector::operator+= ( const SgVector V)
inline

Increments vector by another one.

Parameters
V– a vector to add.

Definition at line 427 of file SgVector.h.

References B_, and N_.

◆ operator-=()

SgVector & SgVector::operator-= ( const SgVector V)
inline

Decrements vector by another one.

Parameters
V– a vector to substract.

Definition at line 444 of file SgVector.h.

References B_, and N_.

◆ operator/=()

SgVector & SgVector::operator/= ( double  d)
inline

Divides vector by scalar.

Parameters
d– a divider.

Definition at line 472 of file SgVector.h.

References B_, and N_.

◆ operator=() [1/2]

SgVector & SgVector::operator= ( const SgVector V)
inline

Assign the vector to the another one.

Parameters
V– a vector to copy.

Definition at line 397 of file SgVector.h.

References B_, and N_.

◆ operator=() [2/2]

SgVector & SgVector::operator= ( double  d)
inline

Fills the vector with a double.

Parameters
d– a value to fill the vector.

Definition at line 416 of file SgVector.h.

References B_, and N_.

◆ operator==()

bool SgVector::operator== ( const SgVector V) const
inline

Comperes the vector with another one, returns TRUE if the vectors are equal.

Parameters
V– a vector for comparing.

Definition at line 483 of file SgVector.h.

References B_, and N_.

◆ reSize()

void SgVector::reSize ( unsigned int  n)
inline

Definition at line 313 of file SgVector.h.

References B_, clear(), n(), and N_.

Referenced by SgVlbiAuxObservation::setTsyses(), and SgVlbiAuxObservation::setTsysesSize().

◆ setElement()

void SgVector::setElement ( unsigned int  i,
double  d 
)
inline

Changes the i-th element.

Parameters
i– an index; valid ranges are: [0,N-1];
d– a new value for i-th element.

Definition at line 348 of file SgVector.h.

References B_, and N_.

Referenced by SgVlbiSession::allocPxyInterpolEpochs(), SgVlbiSession::allocUt1InterpolEpochs(), SgEstimator::calc_aT_P_a(), SgEstimator::calc_aT_P_a_opt(), SgVlbiObservable::calcPhaseCalDelay(), SgVlbiSession::calculateClockBreakParameter(), SgVlbiSession::calculateClockBreaksParameters(), SgSolutionReporter::calculateConditionNumber(), SgStnLogReadings::cleanMeteoParameters(), SgEstimator::collectDependentInfArray(), SgEstimator::dataUpdate(), evaluateEffectiveFreqs(), evaluateEffectiveFreqs_old_version(), evaluatePCal4GrpDelay(), SgSolutionReporter::evaluateUsedErpApriori(), SgVlbiSession::getDataFromDbhImage(), SgVlbiSession::getDataFromVgosDb(), SgAgvDriver::initSession(), SgEstimator::insertNewParameters(), SgVgosDb::loadAntennaApriories(), SgVgosDb::loadAtmSetup(), SgVgosDb::loadCalcEop(), SgVgosDb::loadClockSetup(), SgVgosDb::loadErpApriori(), SgVgosDb::loadObsAmbigSpacing(), SgVgosDb::loadObsChannelInfoMk3(), SgVgosDb::loadObsChannelInfoMk4(), SgVgosDb::loadObsChannelInfoS2(), SgVgosDb::loadObsCorrelation(), SgVgosDb::loadObsCorrelatorInfoCrl(), SgVgosDb::loadObsCorrelatorInfoMk3(), SgVgosDb::loadObsCorrelatorInfoMk4(), SgVgosDb::loadObsCorrelatorInfoS2(), SgVgosDb::loadObsDtec(), SgVgosDb::loadObsFractC(), SgVgosDb::loadObsPhaseCalInfoMk3(), SgVgosDb::loadObsPhaseCalInfoMk4(), SgVgosDb::loadObsPhaseCalInfoS2(), SgVgosDb::loadObsRefFreqs(), SgVgosDb::loadObsSNR(), SgVgosDb::loadObsTheoreticals(), SgVgosDb::loadStationMet(), SgVgosDb::loadStationParAngle(), SgVgosDb::loadStationRefClockOffset(), SgVlbiObservation::prepare4Analysis(), SgVlbiSession::prepare4ErpInterpolation(), SgEstimator::processConstraint(), SgVlbiSession::processKombFile(), SgEstimator::processObs(), SgStnLogReadings::propagateData(), SgEstimator::propagateStochasticParameters(), VcCalc2SessionIfc::put4_fUt1_pts(), SgVlbiSession::putDataIntoVgosDb(), SgExternalEopFile::readC04File(), SgExternalEopFile::readErpFile(), SgExternalEopFile::readFinalsFile(), SgVlbiSession::resolveGrAmbigTriangles(), SgEstimator::saveProcessedParameters(), NsTestDialog::testPlot(), and NsTestFour1Dialog::testPlot().

Friends And Related Function Documentation

◆ calcProduct_matT_x_vec [1/2]

SgVector calcProduct_matT_x_vec ( const SgMatrix M,
const SgVector V 
)
friend

Makes a product of a transposed matrix and a vector.

Parameters
M– a matrix;
V– a vector.

Makes a product of a transposed matrix and a vector.

Parameters
M– a that should be transposed;
V– a vector.

Definition at line 192 of file SgMatrix.cpp.

◆ calcProduct_matT_x_vec [2/2]

SgVector calcProduct_matT_x_vec ( const SgUtMatrix ,
const SgVector  
)
friend

Makes a product of a transposed upper triangular matrix and a vector.

Parameters
M– a matrix;
V– a vector.

◆ operator* [1/6]

SgVector operator* ( const SgMatrix M,
const SgVector V 
)
friend

Makes a product of a matrix and a vector.

Parameters
M– a matrix;
V– a vector.

Definition at line 73 of file SgMatrix.cpp.

◆ operator* [2/6]

SgVector operator* ( const SgSymMatrix P,
const SgVector V 
)
friend

Makes a product of a matrix and a vector.

Parameters
P– a symmetric matrix;
V– a vector.

Makes a product of a matrix and a vector.

Parameters
R– a matrix;
V– a vector.

Definition at line 48 of file SgSymMatrix.cpp.

◆ operator* [3/6]

SgVector operator* ( const SgUtMatrix R,
const SgVector V 
)
friend

Makes a product of a matrix and a vector.

Parameters
R– an upper triangular matrix;
V– a vector.

Makes a product of a matrix and a vector.

Parameters
R– a matrix;
V– a vector.

Definition at line 69 of file SgUtMatrix.cpp.

◆ operator* [4/6]

SgVector operator* ( const SgVector V,
double  d 
)
friend

Returns a vector multiplied by scalar.

Parameters
V– a vector;
d– a scale.

Definition at line 514 of file SgVector.h.

◆ operator* [5/6]

double operator* ( const SgVector V1,
const SgVector V2 
)
friend

Makes a scalar product of two vectors.

Parameters
V1– a first term in the product;
V2– a second term in the product.

Definition at line 554 of file SgVector.h.

◆ operator* [6/6]

SgVector operator* ( double  d,
const SgVector V 
)
friend

Returns a vector multiplied by scalar.

Parameters
d– a scale.
V– a vector;

Definition at line 522 of file SgVector.h.

◆ operator+

SgVector operator+ ( const SgVector V1,
const SgVector V2 
)
friend

Returns a sum of two vectors.

Parameters
V1is a first term,
V2is a second term in the sum.

Definition at line 538 of file SgVector.h.

◆ operator- [1/2]

SgVector operator- ( const SgVector V)
friend

Returns a vector with an inverted sign (unary operator).

Parameters
V– an original vector.

Definition at line 506 of file SgVector.h.

◆ operator- [2/2]

SgVector operator- ( const SgVector V1,
const SgVector V2 
)
friend

Returns a difference of two vectors.

Parameters
V1is a first term,
V2is a second term in the sum.

Definition at line 546 of file SgVector.h.

◆ operator/

SgVector operator/ ( const SgVector V,
double  d 
)
friend

Returns a vector divided by scalar.

Parameters
V– a vector;
d– a divider;

Definition at line 530 of file SgVector.h.

◆ SgMatrix

friend class SgMatrix
friend

Definition at line 64 of file SgVector.h.

◆ SgUtMatrix

friend class SgUtMatrix
friend

Definition at line 65 of file SgVector.h.

Member Data Documentation

◆ B_

double* SgVector::B_
protected

A pointer on a first element of the vector.

Definition at line 258 of file SgVector.h.

Referenced by SgVector(), ~SgVector(), base(), base_c(), clear(), getElement(), module(), operator()(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), operator==(), reSize(), and setElement().

◆ N_

unsigned int SgVector::N_
protected

An number of elements in a vector (dimension).

Definition at line 257 of file SgVector.h.

Referenced by SgVector(), ~SgVector(), clear(), getElement(), module(), n(), operator()(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), operator==(), reSize(), and setElement().


The documentation for this class was generated from the following file: