1 #ifndef CMU462_MATRIX4X4_H
2 #define CMU462_MATRIX4X4_H
35 for(
int i = 0; i < 4; i++ )
36 for(
int j = 0; j < 4; j++ )
39 (*this)(i,j) = data[i*4 + j];
48 void zero(
double val = 0.0);
53 double det(
void )
const;
58 double norm(
void )
const;
85 double& operator()(
int i,
int j );
86 const double& operator()(
int i,
int j )
const;
90 const Vector4D& operator[](
int i )
const;
111 void operator/=(
double x );
127 std::ostream& operator<<( std::ostream& os,
const Matrix4x4& A );
131 #endif // CMU462_MATRIX4X4_H
Matrix4x4 inv(void) const
Returns the inverse of A.
Definition: matrix4x4.cpp:195
Defines 4D standard vectors.
Definition: vector4D.h:15
void zero(double val=0.0)
Sets all elements to val.
Definition: matrix4x4.cpp:26
static Matrix4x4 identity(void)
Returns a fresh 4x4 identity matrix.
Definition: matrix4x4.cpp:235
Vector4D & column(int i)
Returns the ith column.
Definition: matrix4x4.cpp:275
Defines a 4x4 matrix.
Definition: matrix4x4.h:22
double norm(void) const
Returns the Frobenius norm of A.
Definition: matrix4x4.cpp:53
double det(void) const
Returns the determinant of A.
Definition: matrix4x4.cpp:34
Matrix4x4 T(void) const
Returns the transpose of A.
Definition: matrix4x4.cpp:182