#include <UT_Matrix2.h>
Public Member Functions | |
| UT_Matrix2T () | |
| Construct uninitialized matrix. | |
| UT_Matrix2T (T val) | |
| Construct identity matrix, multipled by scalar. | |
| UT_Matrix2T (T val00, T val01, T val10, T val11) | |
| UT_Matrix2T< T > & | operator= (const UT_Matrix3 &m) |
| UT_Matrix2T< T > & | operator+= (const UT_Matrix2T< T > &m) |
| UT_Matrix2T< T > & | operator-= (const UT_Matrix2T< T > &m) |
| UT_Matrix2T< T > & | operator*= (const UT_Matrix2T< T > &m) |
| unsigned | operator== (const UT_Matrix2T< T > &m) const |
| unsigned | operator!= (const UT_Matrix2T< T > &m) const |
| UT_Matrix2T< T > & | operator= (T val) |
| UT_Matrix2T< T > & | operator+= (T scalar) |
| UT_Matrix2T< T > & | operator-= (T scalar) |
| UT_Matrix2T< T > & | operator*= (T scalar) |
| UT_Matrix2T< T > & | operator/= (T scalar) |
| template<typename S > | |
| UT_Matrix2T< T > & | operator= (const UT_Vector2T< S > &vec) |
| template<typename S > | |
| UT_Matrix2T< T > & | operator+= (const UT_Vector2T< S > &vec) |
| template<typename S > | |
| UT_Matrix2T< T > & | operator-= (const UT_Vector2T< S > &vec) |
| T | determinant () const |
| T | trace () const |
| template<typename S > | |
| int | eigenvalues (UT_Vector2T< S > &r, UT_Vector2T< S > &i) const |
| Returns eigenvalues of this matrix. | |
| int | invert () |
| Invert this matrix and return 0 if OK, 1 if singular. | |
| int | invert (UT_Matrix2T< T > &m) const |
| T | tolerance () const |
| Returns the tolerance of our class. | |
| template<typename S > | |
| int | solve (const UT_Vector2T< S > &b, UT_Vector2T< S > &x) const |
| void | transpose (void) |
| UT_Matrix2T< T > | transpose (void) const |
| void | identity () |
| Set the matrix to identity. | |
| void | initialize () |
| Initialize this matrix to zero. | |
| unsigned | hash () const |
| Compute a hash. | |
| T | getEuclideanNorm () const |
| T | getEuclideanNorm2 () const |
| Euclidean norm squared. | |
| int | save (ostream &os, int binary) const |
| bool | load (UT_IStream &is) |
| void | outAsciiNoName (ostream &os) const |
| template<> | |
| float | tolerance () const |
| template<> | |
| double | tolerance () const |
| UT_Matrix2T (const fpreal32 m[2][2]) | |
| Construct a deep copy of the input row-major data. | |
| UT_Matrix2T (const fpreal64 m[2][2]) | |
| Construct a deep copy of the input row-major data. | |
| T & | operator() (unsigned row, unsigned col) |
| Return a matrix entry. No bounds checking on subscripts. | |
| T | operator() (unsigned row, unsigned col) const |
| Return a matrix entry. No bounds checking on subscripts. | |
| const T * | data (void) const |
| Return the raw matrix data. | |
| T * | data (void) |
| Return the raw matrix data. | |
| T * | operator() (unsigned row) |
| Return a matrix row. No bounds checking on subscript. | |
| const T * | operator() (unsigned row) const |
| Return a matrix row. No bounds checking on subscript. | |
| UT_Vector2T< T > | operator[] (unsigned row) const |
| Return a matrix row. No bounds checking on subscript. | |
| bool | save (UT_JSONWriter &w) const |
| bool | save (UT_JSONValue &v) const |
| bool | load (UT_JSONParser &p) |
Static Public Member Functions | |
| static int | entries () |
| Returns the vector size. | |
Friends | |
| ostream & | operator<< (ostream &os, const UT_Matrix2T< T > &v) |
Most of Houdini operates with row vectors that are left-multiplied with matrices. e.g., z = v * M
Definition at line 68 of file UT_Matrix2.h.
| UT_Matrix2T< T >::UT_Matrix2T | ( | ) | [inline] |
| UT_Matrix2T< T >::UT_Matrix2T | ( | T | val | ) | [inline, explicit] |
| UT_Matrix2T< T >::UT_Matrix2T | ( | const fpreal32 | m[2][2] | ) | [inline, explicit] |
| UT_Matrix2T< T >::UT_Matrix2T | ( | const fpreal64 | m[2][2] | ) | [inline, explicit] |
| UT_Matrix2T< T >::UT_Matrix2T | ( | T | val00, | |
| T | val01, | |||
| T | val10, | |||
| T | val11 | |||
| ) | [inline] |
This constructor is for convenience; in many situations, it's less efficient than the array-based constructors.
Definition at line 98 of file UT_Matrix2.h.
| T* UT_Matrix2T< T >::data | ( | void | ) | [inline] |
| const T* UT_Matrix2T< T >::data | ( | void | ) | const [inline] |
| T UT_Matrix2T< T >::determinant | ( | ) | const [inline] |
Definition at line 173 of file UT_Matrix2.h.
| int UT_Matrix2T< T >::eigenvalues | ( | UT_Vector2T< S > & | r, | |
| UT_Vector2T< S > & | i | |||
| ) | const [inline] |
| static int UT_Matrix2T< T >::entries | ( | void | ) | [inline, static] |
| T UT_Matrix2T< T >::getEuclideanNorm | ( | ) | const [inline] |
Euclidean or Frobenius norm of a matrix. Does sqrt(sum(a_ij ^2))
Definition at line 262 of file UT_Matrix2.h.
| T UT_Matrix2T< T >::getEuclideanNorm2 | ( | ) | const [inline] |
| unsigned UT_Matrix2T< T >::hash | ( | ) | const [inline] |
| void UT_Matrix2T< T >::identity | ( | ) | [inline] |
| void UT_Matrix2T< T >::initialize | ( | void | ) | [inline] |
| int UT_Matrix2T< T >::invert | ( | UT_Matrix2T< T > & | m | ) | const [inline] |
Invert the matrix and return 0 if OK, 1 if singular. Puts the inverted matrix in m, and leaves this matrix unchanged.
Definition at line 102 of file UT_Matrix2.C.
| int UT_Matrix2T< T >::invert | ( | void | ) | [inline] |
| bool UT_Matrix2T< T >::load | ( | UT_JSONParser & | p | ) | [inline] |
Methods to serialize to a JSON stream. The matrix is stored as an array of 4 reals.
Definition at line 240 of file UT_Matrix2.C.
| bool UT_Matrix2T< T >::load | ( | UT_IStream & | is | ) | [inline] |
Definition at line 185 of file UT_Matrix2.C.
| unsigned UT_Matrix2T< T >::operator!= | ( | const UT_Matrix2T< T > & | m | ) | const [inline] |
Definition at line 130 of file UT_Matrix2.h.
| const T* UT_Matrix2T< T >::operator() | ( | unsigned | row | ) | const [inline] |
| T* UT_Matrix2T< T >::operator() | ( | unsigned | row | ) | [inline] |
| T UT_Matrix2T< T >::operator() | ( | unsigned | row, | |
| unsigned | col | |||
| ) | const [inline] |
Return a matrix entry. No bounds checking on subscripts.
Definition at line 228 of file UT_Matrix2.h.
| T& UT_Matrix2T< T >::operator() | ( | unsigned | row, | |
| unsigned | col | |||
| ) | [inline] |
Return a matrix entry. No bounds checking on subscripts.
Definition at line 223 of file UT_Matrix2.h.
| UT_Matrix2T<T>& UT_Matrix2T< T >::operator*= | ( | T | scalar | ) | [inline] |
Definition at line 151 of file UT_Matrix2.h.
| UT_Matrix2T< T > & UT_Matrix2T< T >::operator*= | ( | const UT_Matrix2T< T > & | m | ) | [inline] |
Definition at line 45 of file UT_Matrix2.C.
| UT_Matrix2T< T > & UT_Matrix2T< T >::operator+= | ( | const UT_Vector2T< S > & | vec | ) | [inline] |
Definition at line 330 of file UT_Matrix2.h.
| UT_Matrix2T<T>& UT_Matrix2T< T >::operator+= | ( | T | scalar | ) | [inline] |
Definition at line 141 of file UT_Matrix2.h.
| UT_Matrix2T<T>& UT_Matrix2T< T >::operator+= | ( | const UT_Matrix2T< T > & | m | ) | [inline] |
Definition at line 115 of file UT_Matrix2.h.
| UT_Matrix2T< T > & UT_Matrix2T< T >::operator-= | ( | const UT_Vector2T< S > & | vec | ) | [inline] |
Definition at line 340 of file UT_Matrix2.h.
| UT_Matrix2T<T>& UT_Matrix2T< T >::operator-= | ( | T | scalar | ) | [inline] |
Definition at line 147 of file UT_Matrix2.h.
| UT_Matrix2T<T>& UT_Matrix2T< T >::operator-= | ( | const UT_Matrix2T< T > & | m | ) | [inline] |
Definition at line 121 of file UT_Matrix2.h.
| UT_Matrix2T<T>& UT_Matrix2T< T >::operator/= | ( | T | scalar | ) | [inline] |
Definition at line 157 of file UT_Matrix2.h.
| UT_Matrix2T< T > & UT_Matrix2T< T >::operator= | ( | const UT_Vector2T< S > & | vec | ) | [inline] |
Definition at line 320 of file UT_Matrix2.h.
| UT_Matrix2T<T>& UT_Matrix2T< T >::operator= | ( | T | val | ) | [inline] |
Definition at line 135 of file UT_Matrix2.h.
| UT_Matrix2T< T > & UT_Matrix2T< T >::operator= | ( | const UT_Matrix3 & | m | ) | [inline] |
Conversion operator that returns a 2x2 from a 3x3 matrix by ignoring the last row and last column.
Definition at line 36 of file UT_Matrix2.C.
| unsigned UT_Matrix2T< T >::operator== | ( | const UT_Matrix2T< T > & | m | ) | const [inline] |
Definition at line 59 of file UT_Matrix2.C.
| UT_Vector2T< T > UT_Matrix2T< T >::operator[] | ( | unsigned | row | ) | const [inline] |
| void UT_Matrix2T< T >::outAsciiNoName | ( | ostream & | os | ) | const [inline] |
Definition at line 209 of file UT_Matrix2.C.
| bool UT_Matrix2T< T >::save | ( | UT_JSONValue & | v | ) | const [inline] |
Methods to serialize to a JSON stream. The matrix is stored as an array of 4 reals.
Definition at line 234 of file UT_Matrix2.C.
| bool UT_Matrix2T< T >::save | ( | UT_JSONWriter & | w | ) | const [inline] |
Methods to serialize to a JSON stream. The matrix is stored as an array of 4 reals.
Definition at line 228 of file UT_Matrix2.C.
| int UT_Matrix2T< T >::save | ( | ostream & | os, | |
| int | binary | |||
| ) | const [inline] |
Definition at line 165 of file UT_Matrix2.C.
| int UT_Matrix2T< T >::solve | ( | const UT_Vector2T< S > & | b, | |
| UT_Vector2T< S > & | x | |||
| ) | const [inline] |
Definition at line 123 of file UT_Matrix2.C.
| double UT_Matrix2T< double >::tolerance | ( | ) | const [inline] |
Definition at line 312 of file UT_Matrix2.h.
| float UT_Matrix2T< float >::tolerance | ( | ) | const [inline] |
Definition at line 305 of file UT_Matrix2.h.
| T UT_Matrix2T< T >::tolerance | ( | ) | const |
Returns the tolerance of our class.
| T UT_Matrix2T< T >::trace | ( | ) | const [inline] |
Definition at line 177 of file UT_Matrix2.h.
| UT_Matrix2T<T> UT_Matrix2T< T >::transpose | ( | void | ) | const |
| UT_Matrix2T< T > UT_Matrix2T< T >::transpose | ( | void | ) | [inline] |
Definition at line 200 of file UT_Matrix2.h.
| ostream& operator<< | ( | ostream & | os, | |
| const UT_Matrix2T< T > & | v | |||
| ) | [friend] |
Definition at line 282 of file UT_Matrix2.h.
| T UT_Matrix2T< T >::matx[2][2] |
Definition at line 296 of file UT_Matrix2.h.
| T UT_Matrix2T< T >::myFloats[4] |
Definition at line 297 of file UT_Matrix2.h.
1.5.9