59template<
class Type,
int DIM = 4>
122 void Clear() { memset(
_data, 0,
sizeof( Type ) * DIM * DIM ); }
432template<
class Type,
int DIM>
436template<
class Type,
int DIM>
443template<
class Type,
int DIM>
447 for(
int row = 0; row < DIM; ++row )
449 for(
int col = 0; col < DIM; ++col )
451 _matrix[ col ][ row ] = m[ row ][ col ];
456template<
class Type,
int DIM>
460 memcpy( _data, m,
sizeof( Type ) * DIM * DIM );
463template<
class Type,
int DIM>
467 memcpy( _data, m.
_data,
sizeof( Type ) * DIM * DIM );
470template<
class Type,
int DIM>
485 result.
_matrix[ 0 ][ 0 ] = _matrix[ 0 ][ 0 ] * rhs.
_matrix[ 0 ][ 0 ] + _matrix[ 1 ][ 0 ] * rhs.
_matrix[ 0 ][ 1 ] + _matrix[ 2 ][ 0 ] * rhs.
_matrix[ 0 ][ 2 ] + _matrix[ 3 ][ 0 ] * rhs.
_matrix[ 0 ][ 3 ];
486 result.
_matrix[ 1 ][ 0 ] = _matrix[ 0 ][ 0 ] * rhs.
_matrix[ 1 ][ 0 ] + _matrix[ 1 ][ 0 ] * rhs.
_matrix[ 1 ][ 1 ] + _matrix[ 2 ][ 0 ] * rhs.
_matrix[ 1 ][ 2 ] + _matrix[ 3 ][ 0 ] * rhs.
_matrix[ 1 ][ 3 ];
487 result.
_matrix[ 2 ][ 0 ] = _matrix[ 0 ][ 0 ] * rhs.
_matrix[ 2 ][ 0 ] + _matrix[ 1 ][ 0 ] * rhs.
_matrix[ 2 ][ 1 ] + _matrix[ 2 ][ 0 ] * rhs.
_matrix[ 2 ][ 2 ] + _matrix[ 3 ][ 0 ] * rhs.
_matrix[ 2 ][ 3 ];
488 result.
_matrix[ 3 ][ 0 ] = _matrix[ 0 ][ 0 ] * rhs.
_matrix[ 3 ][ 0 ] + _matrix[ 1 ][ 0 ] * rhs.
_matrix[ 3 ][ 1 ] + _matrix[ 2 ][ 0 ] * rhs.
_matrix[ 3 ][ 2 ] + _matrix[ 3 ][ 0 ] * rhs.
_matrix[ 3 ][ 3 ];
489 result.
_matrix[ 0 ][ 1 ] = _matrix[ 0 ][ 1 ] * rhs.
_matrix[ 0 ][ 0 ] + _matrix[ 1 ][ 1 ] * rhs.
_matrix[ 0 ][ 1 ] + _matrix[ 2 ][ 1 ] * rhs.
_matrix[ 0 ][ 2 ] + _matrix[ 3 ][ 1 ] * rhs.
_matrix[ 0 ][ 3 ];
490 result.
_matrix[ 1 ][ 1 ] = _matrix[ 0 ][ 1 ] * rhs.
_matrix[ 1 ][ 0 ] + _matrix[ 1 ][ 1 ] * rhs.
_matrix[ 1 ][ 1 ] + _matrix[ 2 ][ 1 ] * rhs.
_matrix[ 1 ][ 2 ] + _matrix[ 3 ][ 1 ] * rhs.
_matrix[ 1 ][ 3 ];
491 result.
_matrix[ 2 ][ 1 ] = _matrix[ 0 ][ 1 ] * rhs.
_matrix[ 2 ][ 0 ] + _matrix[ 1 ][ 1 ] * rhs.
_matrix[ 2 ][ 1 ] + _matrix[ 2 ][ 1 ] * rhs.
_matrix[ 2 ][ 2 ] + _matrix[ 3 ][ 1 ] * rhs.
_matrix[ 2 ][ 3 ];
492 result.
_matrix[ 3 ][ 1 ] = _matrix[ 0 ][ 1 ] * rhs.
_matrix[ 3 ][ 0 ] + _matrix[ 1 ][ 1 ] * rhs.
_matrix[ 3 ][ 1 ] + _matrix[ 2 ][ 1 ] * rhs.
_matrix[ 3 ][ 2 ] + _matrix[ 3 ][ 1 ] * rhs.
_matrix[ 3 ][ 3 ];
493 result.
_matrix[ 0 ][ 2 ] = _matrix[ 0 ][ 2 ] * rhs.
_matrix[ 0 ][ 0 ] + _matrix[ 1 ][ 2 ] * rhs.
_matrix[ 0 ][ 1 ] + _matrix[ 2 ][ 2 ] * rhs.
_matrix[ 0 ][ 2 ] + _matrix[ 3 ][ 2 ] * rhs.
_matrix[ 0 ][ 3 ];
494 result.
_matrix[ 1 ][ 2 ] = _matrix[ 0 ][ 2 ] * rhs.
_matrix[ 1 ][ 0 ] + _matrix[ 1 ][ 2 ] * rhs.
_matrix[ 1 ][ 1 ] + _matrix[ 2 ][ 2 ] * rhs.
_matrix[ 1 ][ 2 ] + _matrix[ 3 ][ 2 ] * rhs.
_matrix[ 1 ][ 3 ];
495 result.
_matrix[ 2 ][ 2 ] = _matrix[ 0 ][ 2 ] * rhs.
_matrix[ 2 ][ 0 ] + _matrix[ 1 ][ 2 ] * rhs.
_matrix[ 2 ][ 1 ] + _matrix[ 2 ][ 2 ] * rhs.
_matrix[ 2 ][ 2 ] + _matrix[ 3 ][ 2 ] * rhs.
_matrix[ 2 ][ 3 ];
496 result.
_matrix[ 3 ][ 2 ] = _matrix[ 0 ][ 2 ] * rhs.
_matrix[ 3 ][ 0 ] + _matrix[ 1 ][ 2 ] * rhs.
_matrix[ 3 ][ 1 ] + _matrix[ 2 ][ 2 ] * rhs.
_matrix[ 3 ][ 2 ] + _matrix[ 3 ][ 2 ] * rhs.
_matrix[ 3 ][ 3 ];
497 result.
_matrix[ 0 ][ 3 ] = _matrix[ 0 ][ 3 ] * rhs.
_matrix[ 0 ][ 0 ] + _matrix[ 1 ][ 3 ] * rhs.
_matrix[ 0 ][ 1 ] + _matrix[ 2 ][ 3 ] * rhs.
_matrix[ 0 ][ 2 ] + _matrix[ 3 ][ 3 ] * rhs.
_matrix[ 0 ][ 3 ];
498 result.
_matrix[ 1 ][ 3 ] = _matrix[ 0 ][ 3 ] * rhs.
_matrix[ 1 ][ 0 ] + _matrix[ 1 ][ 3 ] * rhs.
_matrix[ 1 ][ 1 ] + _matrix[ 2 ][ 3 ] * rhs.
_matrix[ 1 ][ 2 ] + _matrix[ 3 ][ 3 ] * rhs.
_matrix[ 1 ][ 3 ];
499 result.
_matrix[ 2 ][ 3 ] = _matrix[ 0 ][ 3 ] * rhs.
_matrix[ 2 ][ 0 ] + _matrix[ 1 ][ 3 ] * rhs.
_matrix[ 2 ][ 1 ] + _matrix[ 2 ][ 3 ] * rhs.
_matrix[ 2 ][ 2 ] + _matrix[ 3 ][ 3 ] * rhs.
_matrix[ 2 ][ 3 ];
500 result.
_matrix[ 3 ][ 3 ] = _matrix[ 0 ][ 3 ] * rhs.
_matrix[ 3 ][ 0 ] + _matrix[ 1 ][ 3 ] * rhs.
_matrix[ 3 ][ 1 ] + _matrix[ 2 ][ 3 ] * rhs.
_matrix[ 3 ][ 2 ] + _matrix[ 3 ][ 3 ] * rhs.
_matrix[ 3 ][ 3 ];
515 result.
_matrix[ 0 ][ 0 ] = _matrix[ 0 ][ 0 ] * rhs.
_matrix[ 0 ][ 0 ] + _matrix[ 1 ][ 0 ] * rhs.
_matrix[ 0 ][ 1 ] + _matrix[ 2 ][ 0 ] * rhs.
_matrix[ 0 ][ 2 ] + _matrix[ 3 ][ 0 ] * rhs.
_matrix[ 0 ][ 3 ];
516 result.
_matrix[ 1 ][ 0 ] = _matrix[ 0 ][ 0 ] * rhs.
_matrix[ 1 ][ 0 ] + _matrix[ 1 ][ 0 ] * rhs.
_matrix[ 1 ][ 1 ] + _matrix[ 2 ][ 0 ] * rhs.
_matrix[ 1 ][ 2 ] + _matrix[ 3 ][ 0 ] * rhs.
_matrix[ 1 ][ 3 ];
517 result.
_matrix[ 2 ][ 0 ] = _matrix[ 0 ][ 0 ] * rhs.
_matrix[ 2 ][ 0 ] + _matrix[ 1 ][ 0 ] * rhs.
_matrix[ 2 ][ 1 ] + _matrix[ 2 ][ 0 ] * rhs.
_matrix[ 2 ][ 2 ] + _matrix[ 3 ][ 0 ] * rhs.
_matrix[ 2 ][ 3 ];
518 result.
_matrix[ 3 ][ 0 ] = _matrix[ 0 ][ 0 ] * rhs.
_matrix[ 3 ][ 0 ] + _matrix[ 1 ][ 0 ] * rhs.
_matrix[ 3 ][ 1 ] + _matrix[ 2 ][ 0 ] * rhs.
_matrix[ 3 ][ 2 ] + _matrix[ 3 ][ 0 ] * rhs.
_matrix[ 3 ][ 3 ];
519 result.
_matrix[ 0 ][ 1 ] = _matrix[ 0 ][ 1 ] * rhs.
_matrix[ 0 ][ 0 ] + _matrix[ 1 ][ 1 ] * rhs.
_matrix[ 0 ][ 1 ] + _matrix[ 2 ][ 1 ] * rhs.
_matrix[ 0 ][ 2 ] + _matrix[ 3 ][ 1 ] * rhs.
_matrix[ 0 ][ 3 ];
520 result.
_matrix[ 1 ][ 1 ] = _matrix[ 0 ][ 1 ] * rhs.
_matrix[ 1 ][ 0 ] + _matrix[ 1 ][ 1 ] * rhs.
_matrix[ 1 ][ 1 ] + _matrix[ 2 ][ 1 ] * rhs.
_matrix[ 1 ][ 2 ] + _matrix[ 3 ][ 1 ] * rhs.
_matrix[ 1 ][ 3 ];
521 result.
_matrix[ 2 ][ 1 ] = _matrix[ 0 ][ 1 ] * rhs.
_matrix[ 2 ][ 0 ] + _matrix[ 1 ][ 1 ] * rhs.
_matrix[ 2 ][ 1 ] + _matrix[ 2 ][ 1 ] * rhs.
_matrix[ 2 ][ 2 ] + _matrix[ 3 ][ 1 ] * rhs.
_matrix[ 2 ][ 3 ];
522 result.
_matrix[ 3 ][ 1 ] = _matrix[ 0 ][ 1 ] * rhs.
_matrix[ 3 ][ 0 ] + _matrix[ 1 ][ 1 ] * rhs.
_matrix[ 3 ][ 1 ] + _matrix[ 2 ][ 1 ] * rhs.
_matrix[ 3 ][ 2 ] + _matrix[ 3 ][ 1 ] * rhs.
_matrix[ 3 ][ 3 ];
523 result.
_matrix[ 0 ][ 2 ] = _matrix[ 0 ][ 2 ] * rhs.
_matrix[ 0 ][ 0 ] + _matrix[ 1 ][ 2 ] * rhs.
_matrix[ 0 ][ 1 ] + _matrix[ 2 ][ 2 ] * rhs.
_matrix[ 0 ][ 2 ] + _matrix[ 3 ][ 2 ] * rhs.
_matrix[ 0 ][ 3 ];
524 result.
_matrix[ 1 ][ 2 ] = _matrix[ 0 ][ 2 ] * rhs.
_matrix[ 1 ][ 0 ] + _matrix[ 1 ][ 2 ] * rhs.
_matrix[ 1 ][ 1 ] + _matrix[ 2 ][ 2 ] * rhs.
_matrix[ 1 ][ 2 ] + _matrix[ 3 ][ 2 ] * rhs.
_matrix[ 1 ][ 3 ];
525 result.
_matrix[ 2 ][ 2 ] = _matrix[ 0 ][ 2 ] * rhs.
_matrix[ 2 ][ 0 ] + _matrix[ 1 ][ 2 ] * rhs.
_matrix[ 2 ][ 1 ] + _matrix[ 2 ][ 2 ] * rhs.
_matrix[ 2 ][ 2 ] + _matrix[ 3 ][ 2 ] * rhs.
_matrix[ 2 ][ 3 ];
526 result.
_matrix[ 3 ][ 2 ] = _matrix[ 0 ][ 2 ] * rhs.
_matrix[ 3 ][ 0 ] + _matrix[ 1 ][ 2 ] * rhs.
_matrix[ 3 ][ 1 ] + _matrix[ 2 ][ 2 ] * rhs.
_matrix[ 3 ][ 2 ] + _matrix[ 3 ][ 2 ] * rhs.
_matrix[ 3 ][ 3 ];
527 result.
_matrix[ 0 ][ 3 ] = _matrix[ 0 ][ 3 ] * rhs.
_matrix[ 0 ][ 0 ] + _matrix[ 1 ][ 3 ] * rhs.
_matrix[ 0 ][ 1 ] + _matrix[ 2 ][ 3 ] * rhs.
_matrix[ 0 ][ 2 ] + _matrix[ 3 ][ 3 ] * rhs.
_matrix[ 0 ][ 3 ];
528 result.
_matrix[ 1 ][ 3 ] = _matrix[ 0 ][ 3 ] * rhs.
_matrix[ 1 ][ 0 ] + _matrix[ 1 ][ 3 ] * rhs.
_matrix[ 1 ][ 1 ] + _matrix[ 2 ][ 3 ] * rhs.
_matrix[ 1 ][ 2 ] + _matrix[ 3 ][ 3 ] * rhs.
_matrix[ 1 ][ 3 ];
529 result.
_matrix[ 2 ][ 3 ] = _matrix[ 0 ][ 3 ] * rhs.
_matrix[ 2 ][ 0 ] + _matrix[ 1 ][ 3 ] * rhs.
_matrix[ 2 ][ 1 ] + _matrix[ 2 ][ 3 ] * rhs.
_matrix[ 2 ][ 2 ] + _matrix[ 3 ][ 3 ] * rhs.
_matrix[ 2 ][ 3 ];
530 result.
_matrix[ 3 ][ 3 ] = _matrix[ 0 ][ 3 ] * rhs.
_matrix[ 3 ][ 0 ] + _matrix[ 1 ][ 3 ] * rhs.
_matrix[ 3 ][ 1 ] + _matrix[ 2 ][ 3 ] * rhs.
_matrix[ 3 ][ 2 ] + _matrix[ 3 ][ 3 ] * rhs.
_matrix[ 3 ][ 3 ];
535template<
class Type,
int DIM>
540 memset( result.
_data, 0,
sizeof( Type ) * DIM * DIM );
541 for(
int row = 0; row < DIM; ++row )
543 for(
int col = 0; col < DIM; ++col )
545 for(
int i = 0; i < DIM; ++i )
547 result.
_matrix[ col ][ row ] += _matrix[ i ][ row ] * rhs.
_matrix[ col ][ i ];
554template<
class Type,
int DIM>
558 for(
int row = 0; row < DIM; ++row )
560 for(
int col = 0; col < DIM; ++col )
562 result.
_matrix[ col ][ row ] = _matrix[ col ][ row ] * scalar;
568template<
class Type,
int DIM>
571 for(
int row = 0; row < DIM; ++row )
573 for(
int col = 0; col < DIM; ++col )
575 std::cout.width( 11 );
576 std::cout << _matrix[ col ][ row ] <<
' ';
578 std::cout << std::endl;
580 std::cout << std::endl;
583template<
class Type,
int DIM>
587 for(
int i = 0; i < DIM; ++i )
589 _matrix[ i ][ i ] = Type( 1 );
593template<
class Type,
int DIM>
609 Type det = Type( 1 );
616 for(
int k = 0; k < DIM; ++k )
619 int index = temp.
Pivot( k );
641 for(
int i = k + 1; i < DIM; ++i )
652 for(
int j = k + 1; j < DIM; ++j )
661template<
class Type,
int DIM>
695 for(
int k = 0; k < DIM; ++k )
698 int index = temp.
Pivot( k );
711 size_t byteCount =
sizeof( Type ) * DIM;
712 memcpy( rowptr, inverse.
_matrix[ k ], byteCount );
713 memcpy( inverse.
_matrix[ k ], inverse.
_matrix[ index ], byteCount );
714 memcpy( inverse.
_matrix[ index ], rowptr, byteCount );
720 a1_inv = ( (Type)1.0 ) / temp.
_matrix[ k ][ k ];
721 for(
int j = 0; j < DIM; ++j )
723 temp.
_matrix[ k ][ j ] *= a1_inv;
724 inverse.
_matrix[ k ][ j ] *= a1_inv;
734 for(
int i = 0; i < DIM; ++i )
739 for(
int j = 0; j < DIM; ++j )
750template<
class Type,
int DIM>
756template<
class Type,
int DIM>
761 for(
int row = 0; row < DIM; ++row )
763 for(
int col = 0; col < DIM; ++col )
765 result.
_matrix[ col ][ row ] = _matrix[ row ][ col ];
771template<
class Type,
int DIM>
775 result = Transposition();
779template<
class Type,
int DIM>
784 for(
int row = 0; row < DIM; ++row )
786 for(
int col = 0; col < DIM; ++col )
788 if( col != row && !closeValues( _matrix[ col ][ row ], Type( 0 ) ) )
795template<
class Type,
int DIM>
801 static const GlsMatrix referenceIdentity;
802 if( 0 == memcmp( _data, referenceIdentity.
_data,
sizeof( Type ) * DIM * DIM ) )
807 if( IsScalar() && closeValues( _matrix[ 0 ][ 0 ], Type( 1 ) ) )
813template<
class Type,
int DIM>
821 Type val = _matrix[ 0 ][ 0 ];
822 for(
int i = 0; i < DIM; ++i )
824 if( !closeValues( _matrix[ i ][ i ], val ) )
830template<
class Type,
int DIM>
833 return Determinant() == Type( 0 );
836template<
class Type,
int DIM>
839 return Transposition() == *
this;
842template<
class Type,
int DIM>
845 return Transposition() == -( *this );
848template<
class Type,
int DIM>
852 for(
int row = 0; row < DIM - 1; ++row )
854 for(
int col = row + 1; col < DIM; ++col )
856 if( !closeValues( _matrix[ col ][ row ], Type( 0 ) ) )
863template<
class Type,
int DIM>
867 for(
int row = 1; row < DIM; ++row )
869 for(
int col = 0; col < row; ++col )
871 if( !closeValues( _matrix[ col ][ row ], Type( 0 ) ) )
878template<
class Type,
int DIM>
883 return _matrix[ col ][ row ];
886template<
class Type,
int DIM>
891 return _matrix[ col ][ row ];
894template<
class Type,
int DIM>
897 static const int SIZE = DIM * DIM;
898 for(
int i = 0; i < SIZE; ++i )
900 if( !closeValues( _data[ i ], rhs.
_data[ i ] ) )
906template<
class Type,
int DIM>
909 return !( *
this == rhs );
912template<
class Type,
int DIM>
919 memcpy( _data, m.
_data,
sizeof( Type ) * DIM * DIM );
924template<
class Type,
int DIM>
928 for(
int row = 0; row < DIM; ++row )
930 for(
int col = 0; col < DIM; ++col )
932 _matrix[ col ][ row ] = m[ row ][ col ];
939template<
class Type,
int DIM>
944 for(
int row = 0; row < DIM; ++row )
946 for(
int col = 0; col < DIM; ++col )
948 temp.
_matrix[ col ][ row ] = -_matrix[ col ][ row ];
955template<
class Type,
int DIM>
959 for(
int row = 0; row < DIM; ++row )
961 for(
int col = 0; col < DIM; ++col )
963 _matrix[ col ][ row ] += rhs.
_matrix[ col ][ row ];
969template<
class Type,
int DIM>
973 for(
int row = 0; row < DIM; ++row )
975 for(
int col = 0; col < DIM; ++col )
977 _matrix[ col ][ row ] -= rhs.
_matrix[ col ][ row ];
990 return *
this = *
this * rhs;
1000 return *
this = *
this * rhs;
1003template<
class Type,
int DIM>
1008 memset( result.
_data, 0,
sizeof( Type ) * DIM * DIM );
1009 for(
int row = 0; row < DIM; ++row )
1011 for(
int col = 0; col < DIM; ++col )
1013 for(
int i = 0; i < DIM; ++i )
1015 result.
_matrix[ col ][ row ] += _matrix[ i ][ row ] * rhs.
_matrix[ col ][ i ];
1023template<
class Type,
int DIM>
1027 for(
int row = 0; row < DIM; ++row )
1029 for(
int col = 0; col < DIM; ++col )
1031 _matrix[ col ][ row ] *= scalar;
1037template<
class Type,
int DIM>
1041 for(
int row = 0; row < DIM; ++row )
1043 for(
int col = 0; col < DIM; ++col )
1045 _matrix[ col ][ row ] /= scalar;
1051template<
class Type,
int DIM>
1056 for(
int row = 0; row < DIM; ++row )
1058 for(
int col = 0; col < DIM; ++col )
1060 result.
_matrix[ col ][ row ] = _matrix[ col ][ row ] + rhs.
_matrix[ col ][ row ];
1066template<
class Type,
int DIM>
1071 for(
int row = 0; row < DIM; ++row )
1073 for(
int col = 0; col < DIM; ++col )
1075 result.
_matrix[ col ][ row ] = _matrix[ col ][ row ] - rhs.
_matrix[ col ][ row ];
1081template<
class Type,
int DIM>
1085 for(
int row = 0; row < DIM; ++row )
1087 for(
int col = 0; col < DIM; ++col )
1089 result.
_matrix[ col ][ row ] = _matrix[ col ][ row ] / scalar;
1099template<
class Type,
int DIM>
1102 for(
int row = 0; row < DIM; ++row )
1104 for(
int col = 0; col < DIM; ++col )
1107 ostrm << m( row, col ) <<
' ';
1117template<
class Type,
int DIM>
1121 for(
int row = 0; row < DIM; ++row )
1123 for(
int col = 0; col < DIM; ++col )
1132template<
class Type,
int DIM>
1137 for(
int i = 0, j = 0; i < DIM; ++i, j += DIM )
1139 _matrix[ i ] = &( _data[ j ] );
1143template<
class Type,
int DIM>
1154 for(
unsigned i = row; i < unsigned( DIM ); ++i )
1156 if( ( temp = fabs( _matrix[ i ][ row ] ) ) > amax && temp != 0.0 )
1163 if( _matrix[ k ][ row ] == Type( 0 ) )
1169 else if( k !=
int( row ) )
1175 size_t byteCount =
sizeof( Type ) * DIM;
1176 memcpy( rowptr, _matrix[ k ], byteCount );
1177 memcpy( _matrix[ k ], _matrix[ row ], byteCount );
1178 memcpy( _matrix[ row ], rowptr, byteCount );
1192template<
class Type,
int DIM>
1195 return ( lv - PRECISION ) <= rv && rv <= ( lv + PRECISION );
Definition: gls_matrix.h:61
bool IsSkewSymmetric() const
Definition: gls_matrix.h:843
bool operator!=(const GlsMatrix< Type, DIM > &rhs) const
Definition: gls_matrix.h:907
Type CStyleMatrix[DIM][DIM]
Typedef for a 4x4 matrix stored as a 2D array.
Definition: gls_matrix.h:63
bool IsIdentity() const
Definition: gls_matrix.h:796
void Transpose()
Definition: gls_matrix.h:772
GlsMatrix< Type, DIM > operator+(const GlsMatrix< Type, DIM > &rhs) const
Definition: gls_matrix.h:1053
GlsMatrix< Type, DIM > & operator+=(const GlsMatrix< Type, DIM > &rhs)
Definition: gls_matrix.h:957
Type & operator()(unsigned row, unsigned col)
Definition: gls_matrix.h:879
GlsMatrix< Type, DIM > operator-() const
Definition: gls_matrix.h:940
GlsMatrix< Type, DIM > operator+() const
Definition: gls_matrix.h:309
GlsMatrix< Type, DIM > Inverse() const
Definition: gls_matrix.h:662
GlsMatrix()
Definition: gls_matrix.h:437
virtual ~GlsMatrix()
Definition: gls_matrix.h:471
Type Determinant() const
Definition: gls_matrix.h:594
bool IsLowerTriangular() const
Definition: gls_matrix.h:849
GlsMatrix< Type, DIM > & operator*=(const GlsMatrix< Type, DIM > &rhs)
Definition: gls_matrix.h:1005
bool operator==(const GlsMatrix< Type, DIM > &rhs) const
Definition: gls_matrix.h:895
void MakeIdentity()
Definition: gls_matrix.h:584
GlsMatrix< Type, DIM > operator/(Type scalar) const
Definition: gls_matrix.h:1082
GlsMatrix< Type, DIM > & operator*=(Type scalar)
Definition: gls_matrix.h:1025
Type * Data()
Definition: gls_matrix.h:127
bool IsDiagonal() const
Definition: gls_matrix.h:780
int Pivot(unsigned row)
Definition: gls_matrix.h:1144
GlsMatrix< Type, DIM > & operator=(const GlsMatrix< Type, DIM > &m)
Definition: gls_matrix.h:914
const Type * Data() const
Definition: gls_matrix.h:132
GlsMatrix< Type, DIM > & operator=(const CStyleMatrix m)
Definition: gls_matrix.h:926
GlsMatrix< Type, DIM > Transposition() const
Definition: gls_matrix.h:757
bool IsSingular() const
Definition: gls_matrix.h:831
void Dump() const
Definition: gls_matrix.h:569
bool IsUpperTriangular() const
Definition: gls_matrix.h:864
static const double PRECISION
Definition: gls_matrix.h:367
bool closeValues(Type lv, Type rv) const
Definition: gls_matrix.h:1193
void Initialize()
Definition: gls_matrix.h:1133
Type * _matrix[DIM]
Definition: gls_matrix.h:388
void Clear()
Definition: gls_matrix.h:122
GlsMatrix< Type, DIM > operator*(const GlsMatrix< Type, DIM > &rhs) const
Definition: gls_matrix.h:537
Type operator()(unsigned row, unsigned col) const
Definition: gls_matrix.h:887
GlsMatrix< Type, DIM > & operator/=(Type scalar)
Definition: gls_matrix.h:1039
GlsMatrix< Type, DIM > operator-(const GlsMatrix< Type, DIM > &rhs) const
Definition: gls_matrix.h:1068
GlsMatrix(const CStyleMatrix m)
Definition: gls_matrix.h:444
void Invert()
Definition: gls_matrix.h:751
GlsMatrix(const GlsMatrix< Type, DIM > &m)
Definition: gls_matrix.h:464
Type _data[DIM *DIM]
Definition: gls_matrix.h:376
GlsMatrix< Type, DIM > operator*(Type scalar) const
Definition: gls_matrix.h:555
GlsMatrix< Type, DIM > & operator-=(const GlsMatrix< Type, DIM > &rhs)
Definition: gls_matrix.h:971
GlsMatrix(const Type *m)
Definition: gls_matrix.h:457
bool IsSymmetric() const
Definition: gls_matrix.h:837
bool IsScalar() const
Definition: gls_matrix.h:814
Definition: bmpimage.h:46
bool operator!=(const AttributeName &attr1, const AttributeName &attr2)
Definition: disti_metadata.h:165
std::istream & operator>>(std::istream &istrm, GlsMatrix< Type, DIM > &m)
Definition: gls_matrix.h:1118
std::ostream & operator<<(std::ostream &ostrm, const GlsMatrix< Type, DIM > &m)
Definition: gls_matrix.h:1100
GlsPropString operator+(const GlsPropString &a, GlsPropString &b)
Definition: util.h:1788
bool operator==(const AttributeName &attr1, const AttributeName &attr2)
Definition: disti_metadata.h:154
GlsPropString & operator+=(GlsPropString &a, const GlsPropString &b)
Definition: util.h:1842