OpenWalnut  1.4.0
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
WMatrixFixedTest Class Reference

Tests for WMatrixFixed. More...

#include <WMatrixFixed_test.h>

+ Inheritance diagram for WMatrixFixedTest:

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...
 

Detailed Description

Tests for WMatrixFixed.

Definition at line 40 of file WMatrixFixed_test.h.

Member Function Documentation

void WMatrixFixedTest::setUp ( )
inlineprivate

Set up a matrix used for a lot of tests.

Definition at line 872 of file WMatrixFixed_test.h.

References m_matrix.

void WMatrixFixedTest::testAccessOperator ( )
inline

Tests the access operator for the standard storage type.

Row major storage is assumed.

Definition at line 120 of file WMatrixFixed_test.h.

References ValueStore< ValueT, Rows, Cols >::m_values, and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::m_values.

void WMatrixFixedTest::testAssignmentDifferentStorage ( )
inline

Assignment from matrices with different storage types should work correctly.

Definition at line 421 of file WMatrixFixed_test.h.

References m_matrix, and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::m_values.

void WMatrixFixedTest::testAssignmentMatchingOrDifferentType ( )
inline

Assignment from matrices with matching or different integral types should work correctly.

Definition at line 325 of file WMatrixFixed_test.h.

References m_matrix.

void WMatrixFixedTest::testAt ( )
inline

Check if at() correctly checks for out of bounds indices and returns the same values as operator ().

Definition at line 143 of file WMatrixFixed_test.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at().

void WMatrixFixedTest::testConversion ( )
inline

Test conversion between several matrix types.

Definition at line 493 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testCopyInstantiation ( void  )
inline

Instantiation with copy constructor should throw nothing.

Definition at line 70 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testDistance ( )
inline

Test vector distance.

Definition at line 690 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testDot ( )
inline

Test the dot product.

Definition at line 639 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testEigen3Coversion ( )
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 469 of file WMatrixFixed_test.h.

References m_matrix.

void WMatrixFixedTest::testEqualityOperators ( )
inline

Test for equality comparison of two matrices.

Definition at line 771 of file WMatrixFixed_test.h.

References m_matrix.

void WMatrixFixedTest::testGetColVector ( )
inline

Check if getColumnVector() returns the correct contents.

Definition at line 205 of file WMatrixFixed_test.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getColumnVector().

void WMatrixFixedTest::testGetNbRowsAndCols ( void  )
inline

Number of rows and columns should be returned correctly.

Definition at line 109 of file WMatrixFixed_test.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getColumns(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getRows().

void WMatrixFixedTest::testGetRowVector ( )
inline

Check if getRowVector() returns the correct contents.

Definition at line 179 of file WMatrixFixed_test.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::getRowVector().

void WMatrixFixedTest::testIdentity ( )
inline

Tests the identity function.

Definition at line 284 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testInstantiation ( void  )
inline

Instantiation should throw nothing.

Definition at line 46 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testLength ( )
inline

Test vector length.

Definition at line 669 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testMatrixAdditionAndSubtraction ( )
inline

Matrix addition and subtraction.

Definition at line 614 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testMatrixInverse ( )
inline

Test matrix inversion.

Definition at line 741 of file WMatrixFixed_test.h.

References WMatrixFixed< double, 3, 3 >::identity(), and m_matrix.

void WMatrixFixedTest::testMatrixMultiplication ( )
inline

Test matrix multiplication.

Definition at line 511 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testMatrixTimesScalar ( )
inline

Matrix-scalar multiplication.

Definition at line 589 of file WMatrixFixed_test.h.

References m_matrix.

void WMatrixFixedTest::testNormalize ( )
inline

Test vector normalization.

Definition at line 720 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testSelfAssignment ( )
inline

Test self-assignment.

Definition at line 448 of file WMatrixFixed_test.h.

References m_matrix.

void WMatrixFixedTest::testSetColVector ( )
inline

Check if setColumnVector() sets the matrix contents correctly.

Definition at line 249 of file WMatrixFixed_test.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setColumnVector().

void WMatrixFixedTest::testSetRowVector ( )
inline

Check if setRowVector() sets the matrix contents correctly.

Definition at line 231 of file WMatrixFixed_test.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::setRowVector().

void WMatrixFixedTest::testStreamOperators ( )
inline

Test stream operators.

Definition at line 840 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testTranspose ( )
inline

Test transpose method.

Definition at line 797 of file WMatrixFixed_test.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at(), and m_matrix.

void WMatrixFixedTest::testZero ( )
inline

The zero function should return a matrix that contains only zeros.

Definition at line 267 of file WMatrixFixed_test.h.

Member Data Documentation

WMatrixFixed< double, 3, 3 > WMatrixFixedTest::m_matrix
private

The documentation for this class was generated from the following file: