OpenWalnut
1.5.0dev
|
Tests for WMatrixFixed. More...
#include <WMatrixFixed_test.h>
Classes | |
class | DifferentStorageType |
A class used for a test with different data storage, we use column major order. More... | |
Public Member Functions | |
void | testInstantiation (void) |
Instantiation should throw nothing. More... | |
void | testCopyInstantiation (void) |
Instantiation with copy constructor should throw nothing. More... | |
void | testGetNbRowsAndCols (void) |
Number of rows and columns should be returned correctly. More... | |
void | testAccessOperator () |
Tests the access operator for the standard storage type. More... | |
void | testAt () |
Check if at() correctly checks for out of bounds indices and returns the same values as operator (). More... | |
void | testGetRowVector () |
Check if getRowVector() returns the correct contents. More... | |
void | testGetColVector () |
Check if getColumnVector() returns the correct contents. More... | |
void | testSetRowVector () |
Check if setRowVector() sets the matrix contents correctly. More... | |
void | testSetColVector () |
Check if setColumnVector() sets the matrix contents correctly. More... | |
void | testZero () |
The zero function should return a matrix that contains only zeros. More... | |
void | testIdentity () |
Tests the identity function. More... | |
void | testAssignmentMatchingOrDifferentType () |
Assignment from matrices with matching or different integral types should work correctly. More... | |
void | testAssignmentDifferentStorage () |
Assignment from matrices with different storage types should work correctly. More... | |
void | testSelfAssignment () |
Test self-assignment. More... | |
void | testEigen3Coversion () |
Matrices should be converted to eigen3 matrices correctly. More... | |
void | testConversion () |
Test conversion between several matrix types. More... | |
void | testMatrixMultiplication () |
Test matrix multiplication. More... | |
void | testMatrixTimesScalar () |
Matrix-scalar multiplication. More... | |
void | testMatrixAdditionAndSubtraction () |
Matrix addition and subtraction. More... | |
void | testDot () |
Test the dot product. More... | |
void | testLength () |
Test vector length. More... | |
void | testDistance () |
Test vector distance. More... | |
void | testNormalize () |
Test vector normalization. More... | |
void | testMatrixInverse () |
Test matrix inversion. More... | |
void | testEqualityOperators () |
Test for equality comparison of two matrices. More... | |
void | testTranspose () |
Test transpose method. More... | |
void | testStreamOperators () |
Test stream operators. More... | |
Private Member Functions | |
void | setUp () |
Set up a matrix used for a lot of tests. More... | |
Private Attributes | |
WMatrixFixed< double, 3, 3 > | m_matrix |
A matrix used for a lot of tests. More... | |
Tests for WMatrixFixed.
Definition at line 38 of file WMatrixFixed_test.h.
|
inlineprivate |
Set up a matrix used for a lot of tests.
Definition at line 870 of file WMatrixFixed_test.h.
References m_matrix.
|
inline |
Tests the access operator for the standard storage type.
Row major storage is assumed.
Definition at line 118 of file WMatrixFixed_test.h.
References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::m_values.
|
inline |
Assignment from matrices with different storage types should work correctly.
Definition at line 419 of file WMatrixFixed_test.h.
References m_matrix, and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::m_values.
|
inline |
Assignment from matrices with matching or different integral types should work correctly.
Definition at line 323 of file WMatrixFixed_test.h.
References m_matrix.
|
inline |
Check if at() correctly checks for out of bounds indices and returns the same values as operator ().
Definition at line 141 of file WMatrixFixed_test.h.
References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at().
|
inline |
Test conversion between several matrix types.
Definition at line 491 of file WMatrixFixed_test.h.
|
inline |
Instantiation with copy constructor should throw nothing.
Definition at line 68 of file WMatrixFixed_test.h.
|
inline |
Test vector distance.
Definition at line 688 of file WMatrixFixed_test.h.
|
inline |
Test the dot product.
Definition at line 637 of file WMatrixFixed_test.h.
|
inline |
Matrices should be converted to eigen3 matrices correctly.
Conversion to eigen3 and re-conversion to WMatrix should yield the original matrix.
Definition at line 467 of file WMatrixFixed_test.h.
References m_matrix.
|
inline |
Test for equality comparison of two matrices.
Definition at line 769 of file WMatrixFixed_test.h.
References m_matrix.
|
inline |
Check if getColumnVector() returns the correct contents.
Definition at line 203 of file WMatrixFixed_test.h.
References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getColumnVector().
|
inline |
Number of rows and columns should be returned correctly.
Definition at line 107 of file WMatrixFixed_test.h.
References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getColumns(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getRows().
|
inline |
Check if getRowVector() returns the correct contents.
Definition at line 177 of file WMatrixFixed_test.h.
References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getRowVector().
|
inline |
Tests the identity function.
Definition at line 282 of file WMatrixFixed_test.h.
|
inline |
Instantiation should throw nothing.
Definition at line 44 of file WMatrixFixed_test.h.
|
inline |
Test vector length.
Definition at line 667 of file WMatrixFixed_test.h.
|
inline |
Matrix addition and subtraction.
Definition at line 612 of file WMatrixFixed_test.h.
|
inline |
Test matrix inversion.
Definition at line 739 of file WMatrixFixed_test.h.
References WMatrixFixed< double, 3, 3 >::identity(), and m_matrix.
|
inline |
Test matrix multiplication.
Definition at line 509 of file WMatrixFixed_test.h.
|
inline |
Matrix-scalar multiplication.
Definition at line 587 of file WMatrixFixed_test.h.
References m_matrix.
|
inline |
Test vector normalization.
Definition at line 718 of file WMatrixFixed_test.h.
|
inline |
|
inline |
Check if setColumnVector() sets the matrix contents correctly.
Definition at line 247 of file WMatrixFixed_test.h.
References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setColumnVector().
|
inline |
Check if setRowVector() sets the matrix contents correctly.
Definition at line 229 of file WMatrixFixed_test.h.
References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setRowVector().
|
inline |
Test stream operators.
Definition at line 838 of file WMatrixFixed_test.h.
|
inline |
Test transpose method.
Definition at line 795 of file WMatrixFixed_test.h.
References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at(), and m_matrix.
|
inline |
The zero function should return a matrix that contains only zeros.
Definition at line 265 of file WMatrixFixed_test.h.
|
private |
A matrix used for a lot of tests.
Definition at line 884 of file WMatrixFixed_test.h.
Referenced by setUp(), testAssignmentDifferentStorage(), testAssignmentMatchingOrDifferentType(), testEigen3Coversion(), testEqualityOperators(), testMatrixInverse(), testMatrixTimesScalar(), testSelfAssignment(), and testTranspose().