47#include "FGColumnVector3.h"
117 FGMatrix33(
const double m11,
const double m12,
const double m13,
118 const double m21,
const double m22,
const double m23,
119 const double m31,
const double m32,
const double m33)
139 std::string Dump(
const std::string& delimeter)
const;
146 std::string Dump(
const std::string& delimiter,
const std::string& prefix)
const;
155 double operator()(
unsigned int row,
unsigned int col)
const {
156 return data[(col-1)*eRows+row-1];
169 return data[(col-1)*eRows+row-1];
185 double Entry(
unsigned int row,
unsigned int col)
const {
186 return data[(col-1)*eRows+row-1];
202 double&
Entry(
unsigned int row,
unsigned int col) {
203 return data[(col-1)*eRows+row-1];
209 unsigned int Rows(
void)
const {
return eRows; }
214 unsigned int Cols(
void)
const {
return eColumns; }
223 data[3], data[4], data[5],
224 data[6], data[7], data[8] );
235 void InitMatrix(
void);
240 void InitMatrix(
const double m11,
const double m12,
const double m13,
241 const double m21,
const double m22,
const double m23,
242 const double m31,
const double m32,
const double m33)
266 double Determinant(
void)
const;
371 FGMatrix33 operator*(
const double scalar)
const;
381 FGMatrix33 operator/(
const double scalar)
const;
434 double data[eRows*eColumns];
444inline FGMatrix33 operator*(
double scalar,
const FGMatrix33& A) {
456JSBSIM_API std::ostream& operator<<(std::ostream& os,
const FGMatrix33& M);
465JSBSIM_API std::istream& operator>>(std::istream& is, FGMatrix33& M);
This class implements a 3 element column vector.
Handles matrix math operations.
FGMatrix33 & operator=(std::initializer_list< double > lv)
Assignment operator.
FGMatrix33 Transposed(void) const
Transposed matrix.
unsigned int Cols(void) const
Number of cloumns in the matrix.
~FGMatrix33(void)
Destructor.
FGMatrix33(const FGMatrix33 &M)
Copy constructor.
FGMatrix33(const double m11, const double m12, const double m13, const double m21, const double m22, const double m23, const double m31, const double m32, const double m33)
Initialization by given values.
double & operator()(unsigned int row, unsigned int col)
Write access the entries of the matrix.
FGMatrix33 & operator=(const FGMatrix33 &A)
Assignment operator.
void InitMatrix(const double m11, const double m12, const double m13, const double m21, const double m22, const double m23, const double m31, const double m32, const double m33)
Initialize the matrix.
double Entry(unsigned int row, unsigned int col) const
Read access the entries of the matrix.
double operator()(unsigned int row, unsigned int col) const
Read access the entries of the matrix.
unsigned int Rows(void) const
Number of rows in the matrix.
double & Entry(unsigned int row, unsigned int col)
Write access the entries of the matrix.
bool Invertible(void) const
Return if the matrix is invertible.
Models the Quaternion representation of rotations.