60template<
class Type, 
int DIM = 4>
 
  123    inline void Clear() { memset( 
_data, 0, 
sizeof( Type ) * DIM * DIM ); }
 
  433template<
class Type, 
int DIM>
 
  437template<
class Type, 
int DIM>
 
  444template<
class Type, 
int DIM>
 
  448    for( 
int row = 0; row < DIM; ++row )
 
  450        for( 
int col = 0; col < DIM; ++col )
 
  452            _matrix[ col ][ row ] = m[ row ][ col ];
 
  457template<
class Type, 
int DIM>
 
  461    memcpy( _data, m, 
sizeof( Type ) * DIM * DIM );
 
  464template<
class Type, 
int DIM>
 
  468    memcpy( _data, m.
_data, 
sizeof( Type ) * DIM * DIM );
 
  471template<
class Type, 
int DIM>
 
  486    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 ];
 
  487    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 ];
 
  488    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 ];
 
  489    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 ];
 
  490    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 ];
 
  491    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 ];
 
  492    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 ];
 
  493    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 ];
 
  494    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 ];
 
  495    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 ];
 
  496    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 ];
 
  497    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 ];
 
  498    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 ];
 
  499    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 ];
 
  500    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 ];
 
  501    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 ];
 
  516    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 ];
 
  517    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 ];
 
  518    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 ];
 
  519    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 ];
 
  520    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 ];
 
  521    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 ];
 
  522    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 ];
 
  523    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 ];
 
  524    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 ];
 
  525    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 ];
 
  526    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 ];
 
  527    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 ];
 
  528    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 ];
 
  529    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 ];
 
  530    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 ];
 
  531    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 ];
 
  536template<
class Type, 
int DIM>
 
  541    memset( result.
_data, 0, 
sizeof( Type ) * DIM * DIM );
 
  542    for( 
int row = 0; row < DIM; ++row )
 
  544        for( 
int col = 0; col < DIM; ++col )
 
  546            for( 
int i = 0; i < DIM; ++i )
 
  548                result.
_matrix[ col ][ row ] += _matrix[ i ][ row ] * rhs.
_matrix[ col ][ i ];
 
  555template<
class Type, 
int DIM>
 
  559    for( 
int row = 0; row < DIM; ++row )
 
  561        for( 
int col = 0; col < DIM; ++col )
 
  563            result.
_matrix[ col ][ row ] = _matrix[ col ][ row ] * scalar;
 
  569template<
class Type, 
int DIM>
 
  572    for( 
int row = 0; row < DIM; ++row )
 
  574        for( 
int col = 0; col < DIM; ++col )
 
  576            std::cout.width( 11 );
 
  577            std::cout << _matrix[ col ][ row ] << 
' ';
 
  579        std::cout << std::endl;
 
  581    std::cout << std::endl;
 
  584template<
class Type, 
int DIM>
 
  588    for( 
int i = 0; i < DIM; ++i )
 
  590        _matrix[ i ][ i ] = Type( 1 );
 
  594template<
class Type, 
int DIM>
 
  610    Type det = Type( 1 );
 
  617    for( 
int k = 0; k < DIM; ++k )
 
  620        int index = temp.
Pivot( k );
 
  642        for( 
int i = k + 1; i < DIM; ++i )
 
  653            for( 
int j = k + 1; j < DIM; ++j )
 
  662template<
class Type, 
int DIM>
 
  696    for( 
int k = 0; k < DIM; ++k )
 
  699        int index = temp.
Pivot( k );
 
  712            size_t byteCount = 
sizeof( Type ) * DIM;
 
  713            memcpy( rowptr, inverse.
_matrix[ k ], byteCount );
 
  714            memcpy( inverse.
_matrix[ k ], inverse.
_matrix[ index ], byteCount );
 
  715            memcpy( inverse.
_matrix[ index ], rowptr, byteCount );
 
  721        a1_inv = ( (Type)1.0 ) / temp.
_matrix[ k ][ k ];
 
  722        for( 
int j = 0; j < DIM; ++j )
 
  724            temp.
_matrix[ k ][ j ] *= a1_inv;
 
  725            inverse.
_matrix[ k ][ j ] *= a1_inv;
 
  735        for( 
int i = 0; i < DIM; ++i )
 
  740                for( 
int j = 0; j < DIM; ++j )
 
  751template<
class Type, 
int DIM>
 
  757template<
class Type, 
int DIM>
 
  762    for( 
int row = 0; row < DIM; ++row )
 
  764        for( 
int col = 0; col < DIM; ++col )
 
  766            result.
_matrix[ col ][ row ] = _matrix[ row ][ col ];
 
  772template<
class Type, 
int DIM>
 
  776    result = Transposition();
 
  780template<
class Type, 
int DIM>
 
  785    for( 
int row = 0; row < DIM; ++row )
 
  787        for( 
int col = 0; col < DIM; ++col )
 
  789            if( col != row && !closeValues( _matrix[ col ][ row ], Type( 0 ) ) )
 
  796template<
class Type, 
int DIM>
 
  802    static const GlsMatrix referenceIdentity; 
 
  803    if( 0 == memcmp( _data, referenceIdentity.
_data, 
sizeof( Type ) * DIM * DIM ) )
 
  808    if( IsScalar() && closeValues( _matrix[ 0 ][ 0 ], Type( 1 ) ) )
 
  814template<
class Type, 
int DIM>
 
  822    Type val = _matrix[ 0 ][ 0 ];
 
  823    for( 
int i = 0; i < DIM; ++i )
 
  825        if( !closeValues( _matrix[ i ][ i ], val ) )
 
  831template<
class Type, 
int DIM>
 
  834    return Determinant() == Type( 0 );
 
  837template<
class Type, 
int DIM>
 
  840    return Transposition() == *
this;
 
  843template<
class Type, 
int DIM>
 
  846    return Transposition() == -( *this );
 
  849template<
class Type, 
int DIM>
 
  853    for( 
int row = 0; row < DIM - 1; ++row )
 
  855        for( 
int col = row + 1; col < DIM; ++col )
 
  857            if( !closeValues( _matrix[ col ][ row ], Type( 0 ) ) )
 
  864template<
class Type, 
int DIM>
 
  868    for( 
int row = 1; row < DIM; ++row )
 
  870        for( 
int col = 0; col < row; ++col )
 
  872            if( !closeValues( _matrix[ col ][ row ], Type( 0 ) ) )
 
  879template<
class Type, 
int DIM>
 
  884    return _matrix[ col ][ row ];
 
  887template<
class Type, 
int DIM>
 
  892    return _matrix[ col ][ row ];
 
  895template<
class Type, 
int DIM>
 
  898    static const int SIZE = DIM * DIM;
 
  899    for( 
int i = 0; i < SIZE; ++i )
 
  901        if( !closeValues( _data[ i ], rhs.
_data[ i ] ) )
 
  907template<
class Type, 
int DIM>
 
  910    return !( *
this == rhs );
 
  913template<
class Type, 
int DIM>
 
  920    memcpy( _data, m.
_data, 
sizeof( Type ) * DIM * DIM );
 
  925template<
class Type, 
int DIM>
 
  929    for( 
int row = 0; row < DIM; ++row )
 
  931        for( 
int col = 0; col < DIM; ++col )
 
  933            _matrix[ col ][ row ] = m[ row ][ col ];
 
  940template<
class Type, 
int DIM>
 
  945    for( 
int row = 0; row < DIM; ++row )
 
  947        for( 
int col = 0; col < DIM; ++col )
 
  949            temp.
_matrix[ col ][ row ] = -_matrix[ col ][ row ];
 
  956template<
class Type, 
int DIM>
 
  960    for( 
int row = 0; row < DIM; ++row )
 
  962        for( 
int col = 0; col < DIM; ++col )
 
  964            _matrix[ col ][ row ] += rhs.
_matrix[ col ][ row ];
 
  970template<
class Type, 
int DIM>
 
  974    for( 
int row = 0; row < DIM; ++row )
 
  976        for( 
int col = 0; col < DIM; ++col )
 
  978            _matrix[ col ][ row ] -= rhs.
_matrix[ col ][ row ];
 
  991    return *
this = *
this * rhs; 
 
 1001    return *
this = *
this * rhs; 
 
 1004template<
class Type, 
int DIM>
 
 1009    memset( result.
_data, 0, 
sizeof( Type ) * DIM * DIM );
 
 1010    for( 
int row = 0; row < DIM; ++row )
 
 1012        for( 
int col = 0; col < DIM; ++col )
 
 1014            for( 
int i = 0; i < DIM; ++i )
 
 1016                result.
_matrix[ col ][ row ] += _matrix[ i ][ row ] * rhs.
_matrix[ col ][ i ];
 
 1024template<
class Type, 
int DIM>
 
 1028    for( 
int row = 0; row < DIM; ++row )
 
 1030        for( 
int col = 0; col < DIM; ++col )
 
 1032            _matrix[ col ][ row ] *= scalar;
 
 1038template<
class Type, 
int DIM>
 
 1042    for( 
int row = 0; row < DIM; ++row )
 
 1044        for( 
int col = 0; col < DIM; ++col )
 
 1046            _matrix[ col ][ row ] /= scalar;
 
 1052template<
class Type, 
int DIM>
 
 1057    for( 
int row = 0; row < DIM; ++row )
 
 1059        for( 
int col = 0; col < DIM; ++col )
 
 1061            result.
_matrix[ col ][ row ] = _matrix[ col ][ row ] + rhs.
_matrix[ col ][ row ];
 
 1067template<
class Type, 
int DIM>
 
 1072    for( 
int row = 0; row < DIM; ++row )
 
 1074        for( 
int col = 0; col < DIM; ++col )
 
 1076            result.
_matrix[ col ][ row ] = _matrix[ col ][ row ] - rhs.
_matrix[ col ][ row ];
 
 1082template<
class Type, 
int DIM>
 
 1086    for( 
int row = 0; row < DIM; ++row )
 
 1088        for( 
int col = 0; col < DIM; ++col )
 
 1090            result.
_matrix[ col ][ row ] = _matrix[ col ][ row ] / scalar;
 
 1100template<
class Type, 
int DIM>
 
 1103    for( 
int row = 0; row < DIM; ++row )
 
 1105        for( 
int col = 0; col < DIM; ++col )
 
 1108            ostrm << m( row, col ) << 
' ';
 
 1118template<
class Type, 
int DIM>
 
 1122    for( 
int row = 0; row < DIM; ++row )
 
 1124        for( 
int col = 0; col < DIM; ++col )
 
 1133template<
class Type, 
int DIM>
 
 1138    for( 
int i = 0, j = 0; i < DIM; ++i, j += DIM )
 
 1140        _matrix[ i ] = &( _data[ j ] );
 
 1144template<
class Type, 
int DIM>
 
 1155    for( 
unsigned i = row; i < unsigned( DIM ); ++i )
 
 1157        if( ( temp = fabs( _matrix[ i ][ row ] ) ) > amax && temp != 0.0 )
 
 1164    if( _matrix[ k ][ row ] == Type( 0 ) )
 
 1170    else if( k != 
int( row ) )
 
 1176        size_t byteCount = 
sizeof( Type ) * DIM;
 
 1177        memcpy( rowptr, _matrix[ k ], byteCount );
 
 1178        memcpy( _matrix[ k ], _matrix[ row ], byteCount );
 
 1179        memcpy( _matrix[ row ], rowptr, byteCount );
 
 1193template<
class Type, 
int DIM>
 
 1196    return ( lv - PRECISION ) <= rv && rv <= ( lv + PRECISION );
 
Definition: gls_matrix.h:62
bool IsSkewSymmetric() const
Definition: gls_matrix.h:844
bool operator!=(const GlsMatrix< Type, DIM > &rhs) const
Definition: gls_matrix.h:908
Type CStyleMatrix[DIM][DIM]
Typedef for a 4x4 matrix stored as a 2D array.
Definition: gls_matrix.h:64
bool IsIdentity() const
Definition: gls_matrix.h:797
void Transpose()
Definition: gls_matrix.h:773
GlsMatrix< Type, DIM > operator+(const GlsMatrix< Type, DIM > &rhs) const
Definition: gls_matrix.h:1054
GlsMatrix< Type, DIM > & operator+=(const GlsMatrix< Type, DIM > &rhs)
Definition: gls_matrix.h:958
Type & operator()(unsigned row, unsigned col)
Definition: gls_matrix.h:880
GlsMatrix< Type, DIM > operator-() const
Definition: gls_matrix.h:941
GlsMatrix< Type, DIM > operator+() const
Definition: gls_matrix.h:310
GlsMatrix< Type, DIM > Inverse() const
Definition: gls_matrix.h:663
GlsMatrix()
Definition: gls_matrix.h:438
virtual ~GlsMatrix()
Definition: gls_matrix.h:472
Type Determinant() const
Definition: gls_matrix.h:595
bool IsLowerTriangular() const
Definition: gls_matrix.h:850
GlsMatrix< Type, DIM > & operator*=(const GlsMatrix< Type, DIM > &rhs)
Definition: gls_matrix.h:1006
bool operator==(const GlsMatrix< Type, DIM > &rhs) const
Definition: gls_matrix.h:896
void MakeIdentity()
Definition: gls_matrix.h:585
GlsMatrix< Type, DIM > operator/(Type scalar) const
Definition: gls_matrix.h:1083
GlsMatrix< Type, DIM > & operator*=(Type scalar)
Definition: gls_matrix.h:1026
Type * Data()
Definition: gls_matrix.h:128
bool IsDiagonal() const
Definition: gls_matrix.h:781
int Pivot(unsigned row)
Definition: gls_matrix.h:1145
GlsMatrix< Type, DIM > & operator=(const GlsMatrix< Type, DIM > &m)
Definition: gls_matrix.h:915
const Type * Data() const
Definition: gls_matrix.h:133
GlsMatrix< Type, DIM > & operator=(const CStyleMatrix m)
Definition: gls_matrix.h:927
GlsMatrix< Type, DIM > Transposition() const
Definition: gls_matrix.h:758
bool IsSingular() const
Definition: gls_matrix.h:832
void Dump() const
Definition: gls_matrix.h:570
bool IsUpperTriangular() const
Definition: gls_matrix.h:865
static const double PRECISION
Definition: gls_matrix.h:368
bool closeValues(Type lv, Type rv) const
Definition: gls_matrix.h:1194
void Initialize()
Definition: gls_matrix.h:1134
Type * _matrix[DIM]
Definition: gls_matrix.h:389
void Clear()
Definition: gls_matrix.h:123
GlsMatrix< Type, DIM > operator*(const GlsMatrix< Type, DIM > &rhs) const
Definition: gls_matrix.h:538
Type operator()(unsigned row, unsigned col) const
Definition: gls_matrix.h:888
GlsMatrix< Type, DIM > & operator/=(Type scalar)
Definition: gls_matrix.h:1040
GlsMatrix< Type, DIM > operator-(const GlsMatrix< Type, DIM > &rhs) const
Definition: gls_matrix.h:1069
GlsMatrix(const CStyleMatrix m)
Definition: gls_matrix.h:445
void Invert()
Definition: gls_matrix.h:752
GlsMatrix(const GlsMatrix< Type, DIM > &m)
Definition: gls_matrix.h:465
Type _data[DIM *DIM]
Definition: gls_matrix.h:377
GlsMatrix< Type, DIM > operator*(Type scalar) const
Definition: gls_matrix.h:556
GlsMatrix< Type, DIM > & operator-=(const GlsMatrix< Type, DIM > &rhs)
Definition: gls_matrix.h:972
GlsMatrix(const Type *m)
Definition: gls_matrix.h:458
bool IsSymmetric() const
Definition: gls_matrix.h:838
bool IsScalar() const
Definition: gls_matrix.h:815
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
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:1119
std::ostream & operator<<(std::ostream &ostrm, const GlsMatrix< Type, DIM > &m)
Definition: gls_matrix.h:1101
GlsPropString operator+(const GlsPropString &a, GlsPropString &b)
Definition: util.h:1792
bool operator==(const AttributeName &attr1, const AttributeName &attr2)
Definition: disti_metadata.h:154
GlsPropString & operator+=(GlsPropString &a, const GlsPropString &b)
Definition: util.h:1846