CONFIG LIB 1.5
Configuration Files Library (by TGG 2020)
Loading...
Searching...
No Matches
MATRIX_3x3 Class Reference

MATRIX_3x3 class and functions. More...

#include <matr3d.h>

Public Member Functions

 MATRIX_3x3 (void)
 default constructor - sets components to zero
 
 MATRIX_3x3 (double xx_p, double xy_p, double xz_p, double yx_p, double yy_p, double yz_p, double zx_p, double zy_p, double zz_p)
 constructor - sets components values from variables
 
 MATRIX_3x3 (double M[])
 constructor - sets components values from the array (one dimensional)
 
 MATRIX_3x3 (double M[3][3])
 constructor - sets components values from the array (two dimensional)
 
void GetFrom (double xx_p, double xy_p, double xz_p, double yx_p, double yy_p, double yz_p, double zx_p, double zy_p, double zz_p)
 copies components values from variables
 
void GetFrom (double A[])
 copies components values from the array (one dimensional)
 
void GetFrom (double A[3][3])
 copies components values from the array (two dimensional)
 
void SetToZero (void)
 reset matrix - set all components to zero

 
void Unit (void)
 set unit matrix

 
double Det (void)
 matrix determinant

 

Public Attributes

double xx
 (0,0) element
 
double xy
 (0,1) element
 
double xz
 (0,2) element
 
double yx
 (1,0) element
 
double yy
 (1,1) element
 
double yz
 (1,2) element
 
double zx
 (2,0) element
 
double zy
 (2,1) element
 
double zz
 (2,2) element
 

Detailed Description

MATRIX_3x3 class and functions.

Matrix elements:

   |  xx,   xy,   xz  |
   |  yx,   yy,   yz  |
   |  zx,   zy,   zz  |

Definition at line 40 of file matr3d.h.

Constructor & Destructor Documentation

◆ MATRIX_3x3() [1/4]

MATRIX_3x3::MATRIX_3x3 ( void )
inline

default constructor - sets components to zero

Definition at line 55 of file matr3d.h.

55{ SetToZero(); };
void SetToZero(void)
reset matrix - set all components to zero
Definition matr3d.h:100

◆ MATRIX_3x3() [2/4]

MATRIX_3x3::MATRIX_3x3 ( double xx_p,
double xy_p,
double xz_p,
double yx_p,
double yy_p,
double yz_p,
double zx_p,
double zy_p,
double zz_p )
inline

constructor - sets components values from variables

Definition at line 57 of file matr3d.h.

59 :
60 xx(xx_p) , xy(xy_p) , xz(xz_p) ,
61 yx(yx_p) , yy(yy_p) , yz(yz_p) ,
62 zx(zx_p) , zy(zy_p) , zz(zz_p)
63 {};
double yy
(1,1) element
Definition matr3d.h:48
double xx
(0,0) element
Definition matr3d.h:44
double zz
(2,2) element
Definition matr3d.h:52
double yz
(1,2) element
Definition matr3d.h:49
double zx
(2,0) element
Definition matr3d.h:50
double yx
(1,0) element
Definition matr3d.h:47
double xz
(0,2) element
Definition matr3d.h:46
double xy
(0,1) element
Definition matr3d.h:45
double zy
(2,1) element
Definition matr3d.h:51

◆ MATRIX_3x3() [3/4]

MATRIX_3x3::MATRIX_3x3 ( double M[])
inline

constructor - sets components values from the array (one dimensional)

Definition at line 65 of file matr3d.h.

65 :
66 xx(M[0]) , xy(M[3]) , xz(M[6]) ,
67 yx(M[1]) , yy(M[4]) , yz(M[7]) ,
68 zx(M[2]) , zy(M[5]) , zz(M[8])
69 {};

◆ MATRIX_3x3() [4/4]

MATRIX_3x3::MATRIX_3x3 ( double M[3][3])
inline

constructor - sets components values from the array (two dimensional)

Definition at line 71 of file matr3d.h.

71 :
72 xx(M[0][0]) , xy(M[0][1]) , xz(M[0][2]) ,
73 yx(M[1][0]) , yy(M[1][1]) , yz(M[1][2]) ,
74 zx(M[2][0]) , zy(M[2][1]) , zz(M[2][2])
75 {};

Member Function Documentation

◆ Det()

double MATRIX_3x3::Det ( void )
inline

matrix determinant

Definition at line 114 of file matr3d.h.

115 {
116 return xz*yy*zx + xx*yz*zy + xy*yx*zz;
117 };

Referenced by operator~().

◆ GetFrom() [1/3]

void MATRIX_3x3::GetFrom ( double A[3][3])
inline

copies components values from the array (two dimensional)

Definition at line 93 of file matr3d.h.

94 {
95 xx = A[0][0]; xy = A[0][1]; xz = A[0][2];
96 yx = A[1][0]; yy = A[1][1]; yz = A[1][2];
97 zx = A[2][0]; zy = A[2][1]; zz = A[2][2];
98 };

◆ GetFrom() [2/3]

void MATRIX_3x3::GetFrom ( double A[])
inline

copies components values from the array (one dimensional)

Definition at line 86 of file matr3d.h.

87 {
88 xx = A[0]; xy = A[1]; xz = A[2];
89 yx = A[3]; yy = A[4]; yz = A[5];
90 zx = A[6]; zy = A[7]; zz = A[8];
91 };

◆ GetFrom() [3/3]

void MATRIX_3x3::GetFrom ( double xx_p,
double xy_p,
double xz_p,
double yx_p,
double yy_p,
double yz_p,
double zx_p,
double zy_p,
double zz_p )
inline

copies components values from variables

Definition at line 77 of file matr3d.h.

80 {
81 xx = xx_p; xy = xy_p; xz = xz_p;
82 yx = yx_p; yy = yy_p; yz = yz_p;
83 zx = zx_p; zy = zy_p; zz = zz_p;
84 };

◆ SetToZero()

void MATRIX_3x3::SetToZero ( void )
inline

reset matrix - set all components to zero

Definition at line 100 of file matr3d.h.

101 {
102 xx = 0.0; xy = 0.0; xz = 0.0;
103 yx = 0.0; yy = 0.0; yz = 0.0;
104 zx = 0.0; zy = 0.0; zz = 0.0;
105 };

Referenced by MATRIX_3x3(), and operator~().

◆ Unit()

void MATRIX_3x3::Unit ( void )
inline

set unit matrix

Definition at line 107 of file matr3d.h.

108 {
109 xx = 1.0; xy = 0.0; xz = 0.0;
110 yx = 0.0; yy = 1.0; yz = 0.0;
111 zx = 0.0; zy = 0.0; zz = 1.0;
112 };

Member Data Documentation

◆ xx

◆ xy

◆ xz

◆ yx

◆ yy

◆ yz

◆ zx

◆ zy

◆ zz


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