LRAUV  revA
Matrix6x6.h
Go to the documentation of this file.
1 
10 #ifndef MATRIX6X6_H_
11 #define MATRIX6X6_H_
12 
13 #include "I2D.h"
14 #include "Point6D.h"
15 #include "Matrix3x3.h"
16 
27 class Matrix6x6: public I2D<double>
28 {
29 public:
31  Matrix6x6();
32 
34  Matrix6x6( const double& init );
35 
37  Matrix6x6( Matrix3x3& m3x3i11, Matrix3x3& m3x3i12,
38  Matrix3x3& m3x3i21, Matrix3x3& m3x3i22 );
39 
41  Matrix6x6( Point6D pos );
42 
43  // as a Str
44  Str toString() const;
45 
47  bool determinantZero();
48 
50  void invert();
51 
53  void decomposeLU();
54 
55  // Solve for x in Ax = b, where this is the LU decompostion of
56  // M and b is supplied here.
57  void solveLU( Point6D& b, Point6D& x ) const;
58 
59  //const Point6D operator*( const Point6D& rhs ) const;
60 
61  bool operator==( const Matrix6x6& rhs );
62 
63  Matrix6x6& operator=( const Matrix6x6& rhs );
64 
65  Matrix6x6& operator=( const double rhs );
66 
68  void set( int index1, int index2, Matrix3x3& value );
69 
70  void set( int index1, int index2, const double value );
71 
72  double& operator()( int index1, int index2 );
73 
75  void set( const double& v00, const double& v01, const double& v02, const double& v03, const double& v04, const double& v05,
76  const double& v10, const double& v11, const double& v12, const double& v13, const double& v14, const double& v15,
77  const double& v20, const double& v21, const double& v22, const double& v23, const double& v24, const double& v25,
78  const double& v30, const double& v31, const double& v32, const double& v33, const double& v34, const double& v35,
79  const double& v40, const double& v41, const double& v42, const double& v43, const double& v44, const double& v45,
80  const double& v50, const double& v51, const double& v52, const double& v53, const double& v54, const double& v55 );
81 
83  virtual double** getPtr2d()
84  {
85  return value2d_;
86  }
87 
89  virtual double* getPtr1d()
90  {
91  return value_;
92  }
93 
95  virtual int getM() const
96  {
97  return 6;
98  }
99 
101  virtual int getN() const
102  {
103  return 6;
104  }
105 
106 protected:
107 
108  // The actual data
109  double value_[ 36 ];
110 
111  // For I2D operations
112  double* value2d_[ 6 ];
113 
114 };
115 
116 #endif /*MATRIX6X6_H_*/
Contains a 3x3 array of double precision floating point numbers, along with methods for performing co...
Definition: Matrix3x3.h:27
void solveLU(Point6D &b, Point6D &x) const
Definition: Matrix6x6.cpp:281
void decomposeLU()
Obtain the LU decompostion of this matrix.
Definition: Matrix6x6.cpp:236
void invert()
Inverts this matrix.
Definition: Matrix6x6.cpp:159
bool determinantZero()
Returns true if the determinant of this matrix is zero.
Definition: Matrix6x6.cpp:134
Str toString() const
as a Str
Definition: Matrix6x6.cpp:111
virtual int getM() const
Implement abstract I2D method.
Definition: Matrix6x6.h:95
Wraps six double precision (8-byte) floating point numbers.
Definition: Point6D.h:31
double & operator()(int index1, int index2)
Definition: Matrix6x6.cpp:421
double * value2d_[6]
Definition: Matrix6x6.h:112
virtual double ** getPtr2d()
Implement abstract I2D method.
Definition: Matrix6x6.h:83
double value_[36]
Definition: Matrix6x6.h:109
Matrix6x6()
Empty constructior.
Definition: Matrix6x6.cpp:15
bool operator==(const Matrix6x6 &rhs)
Definition: Matrix6x6.cpp:312
Replacement for standard template class string.
Definition: Str.h:12
Definition: I2D.h:17
virtual double * getPtr1d()
Implement abstract I2D method.
Definition: Matrix6x6.h:89
Matrix6x6 & operator=(const Matrix6x6 &rhs)
Definition: Matrix6x6.cpp:324
Contains the Matrix3x3 class definition.
void set(int index1, int index2, Matrix3x3 &value)
Allows one to treat this 6x6 matrix as a 2x2 matrix of 3x3 matrices.
Definition: Matrix6x6.cpp:355
virtual int getN() const
Implement abstract I2D method.
Definition: Matrix6x6.h:101
Contains a 6x6 array of double precision floating point numbers, along with methods for performing co...
Definition: Matrix6x6.h:27
Contains the Point6D class definition.