OpenWalnut  1.5.0dev
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:
+ Collaboration 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 38 of file WMatrixFixed_test.h.

Member Function Documentation

◆ setUp()

void WMatrixFixedTest::setUp ( )
inlineprivate

Set up a matrix used for a lot of tests.

Definition at line 870 of file WMatrixFixed_test.h.

References m_matrix.

◆ testAccessOperator()

void WMatrixFixedTest::testAccessOperator ( )
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.

◆ testAssignmentDifferentStorage()

void WMatrixFixedTest::testAssignmentDifferentStorage ( )
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.

◆ testAssignmentMatchingOrDifferentType()

void WMatrixFixedTest::testAssignmentMatchingOrDifferentType ( )
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.

◆ testAt()

void WMatrixFixedTest::testAt ( )
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().

+ Here is the call graph for this function:

◆ testConversion()

void WMatrixFixedTest::testConversion ( )
inline

Test conversion between several matrix types.

Definition at line 491 of file WMatrixFixed_test.h.

◆ testCopyInstantiation()

void WMatrixFixedTest::testCopyInstantiation ( void  )
inline

Instantiation with copy constructor should throw nothing.

Definition at line 68 of file WMatrixFixed_test.h.

◆ testDistance()

void WMatrixFixedTest::testDistance ( )
inline

Test vector distance.

Definition at line 688 of file WMatrixFixed_test.h.

◆ testDot()

void WMatrixFixedTest::testDot ( )
inline

Test the dot product.

Definition at line 637 of file WMatrixFixed_test.h.

◆ testEigen3Coversion()

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 467 of file WMatrixFixed_test.h.

References m_matrix.

◆ testEqualityOperators()

void WMatrixFixedTest::testEqualityOperators ( )
inline

Test for equality comparison of two matrices.

Definition at line 769 of file WMatrixFixed_test.h.

References m_matrix.

◆ testGetColVector()

void WMatrixFixedTest::testGetColVector ( )
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().

+ Here is the call graph for this function:

◆ testGetNbRowsAndCols()

void WMatrixFixedTest::testGetNbRowsAndCols ( void  )
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().

+ Here is the call graph for this function:

◆ testGetRowVector()

void WMatrixFixedTest::testGetRowVector ( )
inline

Check if getRowVector() returns the correct contents.

Definition at line 177 of file WMatrixFixed_test.h.

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

+ Here is the call graph for this function:

◆ testIdentity()

void WMatrixFixedTest::testIdentity ( )
inline

Tests the identity function.

Definition at line 282 of file WMatrixFixed_test.h.

◆ testInstantiation()

void WMatrixFixedTest::testInstantiation ( void  )
inline

Instantiation should throw nothing.

Definition at line 44 of file WMatrixFixed_test.h.

◆ testLength()

void WMatrixFixedTest::testLength ( )
inline

Test vector length.

Definition at line 667 of file WMatrixFixed_test.h.

◆ testMatrixAdditionAndSubtraction()

void WMatrixFixedTest::testMatrixAdditionAndSubtraction ( )
inline

Matrix addition and subtraction.

Definition at line 612 of file WMatrixFixed_test.h.

◆ testMatrixInverse()

void WMatrixFixedTest::testMatrixInverse ( )
inline

Test matrix inversion.

Definition at line 739 of file WMatrixFixed_test.h.

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

+ Here is the call graph for this function:

◆ testMatrixMultiplication()

void WMatrixFixedTest::testMatrixMultiplication ( )
inline

Test matrix multiplication.

Definition at line 509 of file WMatrixFixed_test.h.

◆ testMatrixTimesScalar()

void WMatrixFixedTest::testMatrixTimesScalar ( )
inline

Matrix-scalar multiplication.

Definition at line 587 of file WMatrixFixed_test.h.

References m_matrix.

◆ testNormalize()

void WMatrixFixedTest::testNormalize ( )
inline

Test vector normalization.

Definition at line 718 of file WMatrixFixed_test.h.

◆ testSelfAssignment()

void WMatrixFixedTest::testSelfAssignment ( )
inline

Test self-assignment.

Definition at line 446 of file WMatrixFixed_test.h.

References m_matrix.

◆ testSetColVector()

void WMatrixFixedTest::testSetColVector ( )
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().

+ Here is the call graph for this function:

◆ testSetRowVector()

void WMatrixFixedTest::testSetRowVector ( )
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().

+ Here is the call graph for this function:

◆ testStreamOperators()

void WMatrixFixedTest::testStreamOperators ( )
inline

Test stream operators.

Definition at line 838 of file WMatrixFixed_test.h.

◆ testTranspose()

void WMatrixFixedTest::testTranspose ( )
inline

Test transpose method.

Definition at line 795 of file WMatrixFixed_test.h.

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

+ Here is the call graph for this function:

◆ testZero()

void WMatrixFixedTest::testZero ( )
inline

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

Definition at line 265 of file WMatrixFixed_test.h.

Member Data Documentation

◆ m_matrix

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

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