00001 #pragma ident "$Id: SRI.hpp 2293 2010-02-12 18:14:16Z btolman $"
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00049
00050
00051
00052
00053
00054 #ifndef CLASS_SQUAREROOTINFORMATION_INCLUDE
00055 #define CLASS_SQUAREROOTINFORMATION_INCLUDE
00056
00057
00058
00059 #include <string>
00060
00061 #include "Matrix.hpp"
00062 #include "StringUtils.hpp"
00063
00064 #include "Namelist.hpp"
00065 #include "SRIMatrix.hpp"
00066
00067 namespace gpstk
00068 {
00069
00070
00072 extern const Matrix<double> SRINullMatrix;
00073
00074
00166 class SRI {
00167 public:
00169 SRI(void) throw() { }
00170
00172 SRI(const unsigned int)
00173 throw();
00174
00176 SRI(const Namelist&)
00177 throw();
00178
00180 SRI(const Matrix<double>&,
00181 const Vector<double>&,
00182 const Namelist&)
00183 throw(MatrixException);
00184
00186 SRI(const SRI&)
00187 throw();
00188
00190 SRI& operator=(const SRI& right)
00191 throw();
00192
00193
00194
00197 void permute(const Namelist&)
00198 throw(MatrixException,VectorException);
00199
00207 void split(const Namelist&, SRI&)
00208 throw(MatrixException,VectorException);
00209
00212 SRI& operator+=(const Namelist&)
00213 throw(MatrixException,VectorException);
00214
00217 void reshape(const Namelist&)
00218 throw(MatrixException,VectorException);
00219
00221 void merge(const SRI& S)
00222 throw(MatrixException,VectorException)
00223 { *this += S; }
00224
00227 SRI& operator+=(const SRI&)
00228 throw(MatrixException,VectorException);
00229
00231 friend SRI operator+(const SRI&,
00232 const SRI&)
00233 throw(MatrixException,VectorException);
00234
00239 SRI& append(const SRI& S)
00240 throw(MatrixException,VectorException);
00241
00244 void zeroOne(const unsigned int n)
00245 throw();
00246
00250 void zeroAll(const int n=0)
00251 throw();
00252
00254 void zeroState(void)
00255 throw()
00256 { Z = 0.0; }
00257
00260
00261
00262
00266 void shift(const Vector<double>& X0)
00267 throw(MatrixException);
00268
00272 void shiftZ(const Vector<double>& Z0)
00273 throw(MatrixException);
00274
00281 void transform(const Matrix<double>& T,
00282 const Matrix<double>& invT=SRINullMatrix)
00283 throw(MatrixException,VectorException);
00284
00290 void transformState(const Matrix<double>& invT)
00291 throw(MatrixException);
00292
00299 void Qbump(const unsigned int& in,
00300 const double& q=0.0)
00301 throw(MatrixException,VectorException);
00302
00306 void stateFix(const unsigned int& index,
00307 const double& value)
00308 throw(MatrixException,VectorException);
00309
00314 void stateFix(const Namelist& drops,
00315 const Vector<double>& values)
00316 throw(MatrixException,VectorException);
00317
00323 void addAPriori(const Matrix<double>& Cov, const Vector<double>& X)
00324 throw(MatrixException);
00325
00331 void addAPrioriInformation(const Matrix<double>& ICov, const Vector<double>& X)
00332 throw(MatrixException);
00333
00337 void measurementUpdate(Matrix<double>& Partials,
00338 Vector<double>& Data)
00339 throw(MatrixException)
00340 { SrifMU(R, Z, Partials, Data); }
00341
00346 void getConditionNumber(double& small, double& big)
00347 throw(MatrixException);
00348
00359 void getState(Vector<double>& X, int *ptrSingularIndex=NULL)
00360 throw(MatrixException);
00361
00374 void getStateAndCovariance(Vector<double>& X,
00375 Matrix<double>& C,
00376 double *ptrSmall=NULL,
00377 double *ptrBig=NULL)
00378 throw(MatrixException,VectorException);
00379
00380
00383 unsigned int size(void) const
00384 throw()
00385 { return R.rows(); }
00386
00388 Namelist getNames(void)
00389 throw()
00390 { return names; }
00391
00394 std::string getName(const unsigned int in)
00395 throw()
00396 { return names.getName(in); }
00397
00401 bool setName(const unsigned int in,
00402 const std::string& name)
00403 throw()
00404 { return names.setName(in,name); }
00405
00408 unsigned int index(std::string& name)
00409 throw()
00410 { return names.index(name); }
00411
00413 Matrix<double> getR(void)
00414 throw()
00415 { return R; }
00416
00418 Vector<double> getZ(void)
00419 throw()
00420 { return Z; }
00421
00423 friend std::ostream& operator<<(std::ostream& s,
00424 const SRI&);
00425
00426 protected:
00427
00429 Matrix<double> R;
00430
00432 Vector<double> Z;
00433
00435 Namelist names;
00436
00437 };
00438
00439 }
00440
00441
00442 #endif