4 x 4 symmetric matrix  
 More...
#include <JMatrix4S.hh>
 | 
|   | JMatrix4S () | 
|   | Default constructor.  More...
  | 
|   | 
|   | JMatrix4S (const JMatrix4D &A) | 
|   | Contructor.  More...
  | 
|   | 
|   | JMatrix4S (const double __a00, const double __a01, const double __a02, const double __a03, const double __a11, const double __a12, const double __a13, const double __a22, const double __a23, const double __a33) | 
|   | Contructor.  More...
  | 
|   | 
| void  | invert () | 
|   | Invert matrix.  More...
  | 
|   | 
| JMatrix4D &  | setIdentity () | 
|   | Set to identity matrix.  More...
  | 
|   | 
| void  | set (const JMatrix4D &A) | 
|   | Set matrix.  More...
  | 
|   | 
| JMatrix4D &  | reset () | 
|   | Set matrix to the null matrix.  More...
  | 
|   | 
| JMatrix4D &  | transpose () | 
|   | Transpose.  More...
  | 
|   | 
| JMatrix4D &  | negate () | 
|   | Negate matrix.  More...
  | 
|   | 
| JMatrix4D &  | add (const JMatrix4D &A) | 
|   | Matrix addition.  More...
  | 
|   | 
| JMatrix4D &  | sub (const JMatrix4D &A) | 
|   | Matrix subtraction.  More...
  | 
|   | 
| JMatrix4D &  | mul (const double factor) | 
|   | Scale matrix.  More...
  | 
|   | 
| const JMatrix4D &  | mul (const JMatrix4D &A, const JMatrix4D &B) | 
|   | Matrix multiplication.  More...
  | 
|   | 
| JMatrix4D &  | mul (const JSecond_t &object) | 
|   | Multiply with object.  More...
  | 
|   | 
| JMatrix4D &  | div (const double factor) | 
|   | Scale matrix.  More...
  | 
|   | 
| bool  | equals (const JMatrix4D &A, const double eps=std::numeric_limits< double >::min()) const | 
|   | Equality.  More...
  | 
|   | 
| bool  | isIdentity (const double eps=std::numeric_limits< double >::min()) const | 
|   | Test identity.  More...
  | 
|   | 
| double  | getDeterminant () const | 
|   | Get determinant of matrix.  More...
  | 
|   | 
| void  | transform (double &__x0, double &__x1, double &__x2, double &__x3) const | 
|   | Transform.  More...
  | 
|   | 
4 x 4 symmetric matrix 
Definition at line 26 of file JMatrix4S.hh.
 
◆ JMatrix4S() [1/3]
  
  
      
        
          | JMATH::JMatrix4S::JMatrix4S  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JMatrix4S() [2/3]
  
  
      
        
          | JMATH::JMatrix4S::JMatrix4S  | 
          ( | 
          const JMatrix4D &  | 
          A | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JMatrix4S() [3/3]
  
  
      
        
          | JMATH::JMatrix4S::JMatrix4S  | 
          ( | 
          const double  | 
          __a00,  | 
         
        
           | 
           | 
          const double  | 
          __a01,  | 
         
        
           | 
           | 
          const double  | 
          __a02,  | 
         
        
           | 
           | 
          const double  | 
          __a03,  | 
         
        
           | 
           | 
          const double  | 
          __a11,  | 
         
        
           | 
           | 
          const double  | 
          __a12,  | 
         
        
           | 
           | 
          const double  | 
          __a13,  | 
         
        
           | 
           | 
          const double  | 
          __a22,  | 
         
        
           | 
           | 
          const double  | 
          __a23,  | 
         
        
           | 
           | 
          const double  | 
          __a33  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Contructor. 
- Parameters
 - 
  
    | __a00 | (0,0)  | 
    | __a01 | (0,1)  | 
    | __a02 | (0,2)  | 
    | __a03 | (0,3)  | 
    | __a11 | (1,1)  | 
    | __a12 | (1,2)  | 
    | __a13 | (1,3)  | 
    | __a22 | (2,2)  | 
    | __a23 | (2,3)  | 
    | __a33 | (3,3)  | 
  
   
Definition at line 62 of file JMatrix4S.hh.
   67                 __a01, __a11, __a12, __a13,
 
   68                 __a02, __a12, __a22, __a23,
 
   69                 __a03, __a13, __a23, __a33)
 
 
 
 
◆ invert()
  
  
      
        
          | void JMATH::JMatrix4S::invert  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Invert matrix. 
Definition at line 76 of file JMatrix4S.hh.
   90       if (fabs(
a10) > fabs(val)) {
 
   95       if (fabs(
a20) > fabs(val)) {
 
  100       if (fabs(
a30) > fabs(val)) {
 
  130         throw JDivisionByZero(
"LDU decomposition zero pivot");  
 
  150       if (fabs(
a21) > fabs(val)) {
 
  155       if (fabs(
a31) > fabs(val)) {
 
  178         throw JDivisionByZero(
"LDU decomposition zero pivot");
 
  191       if (fabs(
a32) > fabs(val)) {
 
  207         throw JDivisionByZero(
"LDU decomposition zero pivot");
 
  216         throw JDivisionByZero(
"D matrix not invertable");
 
 
 
 
◆ getInstance()
  
  
      
        
          | static const JMatrix4D& JMATH::JMatrix4D::getInstance  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Get reference to unique instance of this class object. 
- Returns
 - zero matrix 
 
Definition at line 89 of file JMatrix4D.hh.
 
 
◆ setIdentity()
Set to identity matrix. 
- Returns
 - this matrix 
 
Definition at line 102 of file JMatrix4D.hh.
 
 
◆ getIdentity()
  
  
      
        
          | static const JMatrix4D& JMATH::JMatrix4D::getIdentity  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinestaticinherited   | 
  
 
Get reference to unique instance of this class object. 
- Returns
 - identity matrix 
 
Definition at line 118 of file JMatrix4D.hh.
 
 
◆ set()
  
  
      
        
          | void JMATH::JMatrix4D::set  | 
          ( | 
          const JMatrix4D &  | 
          A | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Set matrix. 
- Parameters
 - 
  
  
 
Definition at line 131 of file JMatrix4D.hh.
  133       static_cast<JMatrix4D&>(*
this) = A;
 
 
 
 
◆ reset()
Set matrix to the null matrix. 
- Returns
 - this matrix 
 
Definition at line 142 of file JMatrix4D.hh.
 
 
◆ transpose()
◆ negate()
Negate matrix. 
- Returns
 - -this matrix 
 
Definition at line 175 of file JMatrix4D.hh.
 
 
◆ add()
Matrix addition. 
- Parameters
 - 
  
  
 
- Returns
 - this matrix + A 
 
Definition at line 192 of file JMatrix4D.hh.
 
 
◆ sub()
Matrix subtraction. 
- Parameters
 - 
  
  
 
- Returns
 - this matrix - A 
 
Definition at line 209 of file JMatrix4D.hh.
 
 
◆ mul() [1/3]
  
  
      
        
          | JMatrix4D& JMATH::JMatrix4D::mul  | 
          ( | 
          const double  | 
          factor | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Scale matrix. 
- Parameters
 - 
  
  
 
- Returns
 - this matrix * factor 
 
Definition at line 226 of file JMatrix4D.hh.
  228       a00 *= factor; 
a01 *= factor; 
a02 *= factor; 
a03 *= factor;
 
  229       a10 *= factor; 
a11 *= factor; 
a12 *= factor; 
a13 *= factor;
 
  230       a20 *= factor; 
a21 *= factor; 
a22 *= factor; 
a23 *= factor;
 
  231       a30 *= factor; 
a31 *= factor; 
a32 *= factor; 
a33 *= factor;
 
 
 
 
◆ mul() [2/3]
Matrix multiplication. 
- Parameters
 - 
  
  
 
- Returns
 - this matrix 
 
Definition at line 261 of file JMatrix4D.hh.
 
 
◆ mul() [3/3]
Multiply with object. 
- Parameters
 - 
  
  
 
- Returns
 - result object 
 
Definition at line 273 of file JMath.hh.
 
 
◆ div()
  
  
      
        
          | JMatrix4D& JMATH::JMatrix4D::div  | 
          ( | 
          const double  | 
          factor | ) | 
           | 
         
       
   | 
  
inlineinherited   | 
  
 
Scale matrix. 
- Parameters
 - 
  
  
 
- Returns
 - this matrix / factor 
 
Definition at line 243 of file JMatrix4D.hh.
  245       a00 /= factor; 
a01 /= factor; 
a02 /= factor; 
a03 /= factor;
 
  246       a10 /= factor; 
a11 /= factor; 
a12 /= factor; 
a13 /= factor;
 
  247       a20 /= factor; 
a21 /= factor; 
a22 /= factor; 
a23 /= factor;
 
  248       a30 /= factor; 
a31 /= factor; 
a32 /= factor; 
a33 /= factor;
 
 
 
 
◆ equals()
  
  
      
        
          | bool JMATH::JMatrix4D::equals  | 
          ( | 
          const JMatrix4D &  | 
          A,  | 
         
        
           | 
           | 
          const double  | 
          eps = std::numeric_limits<double>::min()  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inlineinherited   | 
  
 
Equality. 
- Parameters
 - 
  
    | A | matrix  | 
    | eps | numerical precision  | 
  
   
- Returns
 - true if matrices identical; else false 
 
Definition at line 295 of file JMatrix4D.hh.
  298       return (fabs(
a00 - A.
a00) <= eps  &&
 
  299               fabs(
a01 - A.
a01) <= eps  &&
 
  300               fabs(
a02 - A.
a02) <= eps  &&
 
  301               fabs(
a03 - A.
a03) <= eps  &&
 
  302               fabs(
a10 - A.
a10) <= eps  &&
 
  303               fabs(
a11 - A.
a11) <= eps  &&
 
  304               fabs(
a12 - A.
a12) <= eps  &&
 
  305               fabs(
a13 - A.
a13) <= eps  &&
 
  306               fabs(
a20 - A.
a20) <= eps  &&
 
  307               fabs(
a21 - A.
a21) <= eps  &&
 
  308               fabs(
a22 - A.
a22) <= eps  &&
 
  309               fabs(
a23 - A.
a23) <= eps  &&
 
  310               fabs(
a30 - A.
a30) <= eps  &&
 
  311               fabs(
a31 - A.
a31) <= eps  &&
 
  312               fabs(
a32 - A.
a32) <= eps  &&
 
  313               fabs(
a33 - A.
a33) <= eps);
 
 
 
 
◆ isIdentity()
  
  
      
        
          | bool JMATH::JMatrix4D::isIdentity  | 
          ( | 
          const double  | 
          eps = std::numeric_limits<double>::min() | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Test identity. 
- Parameters
 - 
  
  
 
- Returns
 - true if identity matrix; else false 
 
Definition at line 323 of file JMatrix4D.hh.
 
 
◆ getDeterminant()
  
  
      
        
          | double JMATH::JMatrix4D::getDeterminant  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
Get determinant of matrix. 
- Returns
 - determinant of matrix 
 
Definition at line 334 of file JMatrix4D.hh.
 
 
◆ transform()
  
  
      
        
          | void JMATH::JMatrix4D::transform  | 
          ( | 
          double &  | 
          __x0,  | 
         
        
           | 
           | 
          double &  | 
          __x1,  | 
         
        
           | 
           | 
          double &  | 
          __x2,  | 
         
        
           | 
           | 
          double &  | 
          __x3  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inlineinherited   | 
  
 
Transform. 
- Parameters
 - 
  
    | __x0 | x0 value  | 
    | __x1 | x1 value  | 
    | __x2 | x2 value  | 
    | __x3 | x3 value  | 
  
   
Definition at line 366 of file JMatrix4D.hh.
  368       const double x0 = 
a00 * __x0  +  
a01 * __x1  +  
a02 * __x2  +  
a03 * __x3;
 
  369       const double x1 = 
a10 * __x0  +  
a11 * __x1  +  
a12 * __x2  +  
a13 * __x3;
 
  370       const double x2 = 
a20 * __x0  +  
a21 * __x1  +  
a22 * __x2  +  
a23 * __x3;
 
  371       const double x3 = 
a30 * __x0  +  
a31 * __x1  +  
a32 * __x2  +  
a33 * __x3;
 
 
 
 
◆ a00
  
  
      
        
          | double JMATH::JMatrix4D::a00 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a01
  
  
      
        
          | double JMATH::JMatrix4D::a01 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a02
  
  
      
        
          | double JMATH::JMatrix4D::a02 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a03
  
  
      
        
          | double JMATH::JMatrix4D::a03 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a10
  
  
      
        
          | double JMATH::JMatrix4D::a10 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a11
  
  
      
        
          | double JMATH::JMatrix4D::a11 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a12
  
  
      
        
          | double JMATH::JMatrix4D::a12 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a13
  
  
      
        
          | double JMATH::JMatrix4D::a13 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a20
  
  
      
        
          | double JMATH::JMatrix4D::a20 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a21
  
  
      
        
          | double JMATH::JMatrix4D::a21 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a22
  
  
      
        
          | double JMATH::JMatrix4D::a22 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a23
  
  
      
        
          | double JMATH::JMatrix4D::a23 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a30
  
  
      
        
          | double JMATH::JMatrix4D::a30 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a31
  
  
      
        
          | double JMATH::JMatrix4D::a31 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a32
  
  
      
        
          | double JMATH::JMatrix4D::a32 | 
         
       
   | 
  
inherited   | 
  
 
 
◆ a33
  
  
      
        
          | double JMATH::JMatrix4D::a33 | 
         
       
   | 
  
inherited   | 
  
 
 
The documentation for this class was generated from the following file: