Matrix_T.hpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
39 #ifndef GNSSTK_MATRIX_T_HPP
40 #define GNSSTK_MATRIX_T_HPP
41 
42 #include "Matrix.hpp"
43 #include "Vector.hpp"
44 #include "TestUtil.hpp"
45 #include <iostream>
46 #include <fstream>
47 #include <sstream>
48 
49 class Matrix_T
50 {
51 public:
52  Matrix_T() // Default Constructor, set values that will be used frequently
53  {
54  eps = 1e-12;
55  double dat1[6] = {2,5,5,
56  -3,-7,2};
57 
58  double dat2[12] = {1,0,-2,1,
59  3,1,-2,2,
60  -5,-1,9,3};
61  double dat3[20] = {2, 3, 1, 5, 1,
62  1, 0, 3, 1, 2,
63  0, 2, -3, 2, 3,
64  0, 2, 3, 1, 4};
65  double dat4[24] = {8,5,18,-2,1.5,1./6,
66  7,-9,5,0,7,0,
67  1,7,10,11,47,52,
68  -78,24,20,-68,0,0};
69 
70 
71  //Temp values needed b/c can't assign matrix size to public members at initialization
72  //The temps can give the matrices the sizes (and values) needed
73  gnsstk::Matrix<double> A1augTemp(2,3), A2augTemp(3,4), A3augTemp(4,5), A4augTemp(4,6);
74 
75  A1augTemp = dat1;
76  A2augTemp = dat2;
77  A3augTemp = dat3;
78  A4augTemp = dat4;
79 
80  gnsstk::Matrix<double> A1Temp(A1augTemp, 0, 0, 2, 2);
81  gnsstk::Matrix<double> A2Temp(A2augTemp, 0, 0, 3, 3);
82  gnsstk::Matrix<double> A3Temp(A3augTemp, 0, 0, 4, 4);
83  gnsstk::Matrix<double> A4Temp(A4augTemp, 0, 0, 4, 5);
84 
85  A1aug = A1augTemp;
86  A2aug = A2augTemp;
87  A3aug = A3augTemp;
88  A4aug = A4augTemp;
89 
90  A1 = A1Temp;
91  A2 = A2Temp;
92  A3 = A3Temp;
93  A4 = A4Temp;
94 
98 
99  B1 = B1Temp;
100  B2 = B2Temp;
101  B3 = B3Temp;
102  }
103 
104  ~Matrix_T() // Default Desructor
105  { // finally delete objects
106 
107  }
108 
109  double eps;
112 
113  //Functions in Matrix_Initialization_T.cpp
114  int initializeConstantsTest(void);
115  int initializeVectorsTest(void);
116  int initializeArrayTest(void);
117 
118  //Functions in Matrix_Sizing_T.cpp
119  int sizeTest(void);
120 
121  //Functions in Matrix_Operators_T.cpp
122  int operatorTest(void);
123 
124  //Functions in Matrix_InverseTranspose_T.cpp
125  int inverseTest(void);
126  int transposeTest(void);
127  int solutionTest(void);
128  int determinantTest(void);
129 
130  //Functions in Matrix_LUDecomp_T.cpp
131  int LUinitializationTest(void);
132  int LUdeterminantTest(void);
133  int LUATest(void);
134  int LUbackSubTest(void);
135 
136  //Functions in Matrix_SVD_T.cpp
137  int SVDATest(void);
138  int SVDBackSubTest(void);
139  int SVDDeterminantTest(void);
140 
141 
142 private:
143  std::stringstream failDescriptionStream;
145  std::string failMesg;
146 
147 };
148 
149 #endif
Matrix_T::initializeArrayTest
int initializeArrayTest(void)
Definition: Matrix_Initialization_T.cpp:207
Matrix_T::eps
double eps
Definition: Matrix_T.hpp:109
Matrix_T::initializeConstantsTest
int initializeConstantsTest(void)
Definition: Matrix_Initialization_T.cpp:45
Matrix_T::LUATest
int LUATest(void)
Definition: Matrix_LUDecomp_T.cpp:158
Matrix_T::failDescriptionStream
std::stringstream failDescriptionStream
Definition: Matrix_T.hpp:143
Matrix_T
Definition: Matrix_T.hpp:49
Matrix_T::inverseTest
int inverseTest(void)
Definition: Matrix_InverseTranspose_T.cpp:41
Matrix_T::SVDATest
int SVDATest(void)
Matrix_T::B2
gnsstk::Vector< double > B2
Definition: Matrix_T.hpp:111
Matrix_T::initializeVectorsTest
int initializeVectorsTest(void)
Definition: Matrix_Initialization_T.cpp:113
Matrix_T::A2aug
gnsstk::Matrix< double > A2aug
Definition: Matrix_T.hpp:110
Matrix_T::LUbackSubTest
int LUbackSubTest(void)
Definition: Matrix_LUDecomp_T.cpp:193
Matrix_T::failDescriptionString
std::string failDescriptionString
Definition: Matrix_T.hpp:144
Matrix_T::SVDDeterminantTest
int SVDDeterminantTest(void)
Matrix_T::failMesg
std::string failMesg
Definition: Matrix_T.hpp:145
Matrix_T::A4aug
gnsstk::Matrix< double > A4aug
Definition: Matrix_T.hpp:110
Matrix_T::transposeTest
int transposeTest(void)
Definition: Matrix_InverseTranspose_T.cpp:91
Matrix_T::solutionTest
int solutionTest(void)
Definition: Matrix_InverseTranspose_T.cpp:151
TestUtil.hpp
Matrix_T::B3
gnsstk::Vector< double > B3
Definition: Matrix_T.hpp:111
gnsstk::Matrix< double >
Matrix_T::A3aug
gnsstk::Matrix< double > A3aug
Definition: Matrix_T.hpp:110
Matrix_T::A1aug
gnsstk::Matrix< double > A1aug
Definition: Matrix_T.hpp:110
Matrix_T::LUinitializationTest
int LUinitializationTest(void)
Definition: Matrix_LUDecomp_T.cpp:134
Matrix_T::A3
gnsstk::Matrix< double > A3
Definition: Matrix_T.hpp:110
gnsstk::Vector< double >
Matrix_T::operatorTest
int operatorTest(void)
Definition: Matrix_Operators_T.cpp:42
gnsstk::ConstMatrixBase::colCopy
Vector< T > colCopy(size_t c, size_t r=0) const
Definition: MatrixBase.hpp:146
Matrix_T::LUdeterminantTest
int LUdeterminantTest(void)
Definition: Matrix_LUDecomp_T.cpp:146
Matrix_T::determinantTest
int determinantTest(void)
Definition: Matrix_InverseTranspose_T.cpp:202
Matrix_T::A2
gnsstk::Matrix< double > A2
Definition: Matrix_T.hpp:110
Matrix_T::~Matrix_T
~Matrix_T()
Definition: Matrix_T.hpp:104
Matrix.hpp
Matrix_T::B1
gnsstk::Vector< double > B1
Definition: Matrix_T.hpp:111
Matrix_T::Matrix_T
Matrix_T()
Definition: Matrix_T.hpp:52
Matrix_T::sizeTest
int sizeTest(void)
Definition: Matrix_Sizing_T.cpp:42
Matrix_T::A1
gnsstk::Matrix< double > A1
Definition: Matrix_T.hpp:110
Matrix_T::SVDBackSubTest
int SVDBackSubTest(void)
Vector.hpp
Matrix_T::A4
gnsstk::Matrix< double > A4
Definition: Matrix_T.hpp:110


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39