OpenWalnut  1.4.0
Classes | Public Member Functions | Private Member Functions | Private Attributes
WMatrixFixedTest Class Reference

Tests for WMatrixFixed. More...

#include <WMatrixFixed_test.h>

+ Inheritance diagram for WMatrixFixedTest:

List of all members.

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.
void testCopyInstantiation (void)
 Instantiation with copy constructor should throw nothing.
void testGetNbRowsAndCols (void)
 Number of rows and columns should be returned correctly.
void testAccessOperator ()
 Tests the access operator for the standard storage type.
void testAt ()
 Check if at() correctly checks for out of bounds indices and returns the same values as operator ().
void testGetRowVector ()
 Check if getRowVector() returns the correct contents.
void testGetColVector ()
 Check if getColumnVector() returns the correct contents.
void testSetRowVector ()
 Check if setRowVector() sets the matrix contents correctly.
void testSetColVector ()
 Check if setColumnVector() sets the matrix contents correctly.
void testZero ()
 The zero function should return a matrix that contains only zeros.
void testIdentity ()
 Tests the identity function.
void testAssignmentMatchingOrDifferentType ()
 Assignment from matrices with matching or different integral types should work correctly.
void testAssignmentDifferentStorage ()
 Assignment from matrices with different storage types should work correctly.
void testSelfAssignment ()
 Test self-assignment.
void testEigen3Coversion ()
 Matrices should be converted to eigen3 matrices correctly.
void testConversion ()
 Test conversion between several matrix types.
void testMatrixMultiplication ()
 Test matrix multiplication.
void testMatrixTimesScalar ()
 Matrix-scalar multiplication.
void testMatrixAdditionAndSubtraction ()
 Matrix addition and subtraction.
void testDot ()
 Test the dot product.
void testLength ()
 Test vector length.
void testDistance ()
 Test vector distance.
void testNormalize ()
 Test vector normalization.
void testMatrixInverse ()
 Test matrix inversion.
void testEqualityOperators ()
 Test for equality comparison of two matrices.
void testTranspose ()
 Test transpose method.
void testStreamOperators ()
 Test stream operators.

Private Member Functions

void setUp ()
 Set up a matrix used for a lot of tests.

Private Attributes

WMatrixFixed< double, 3, 3 > m_matrix
 A matrix used for a lot of tests.

Detailed Description

Tests for WMatrixFixed.

Definition at line 38 of file WMatrixFixed_test.h.


Member Function Documentation

void WMatrixFixedTest::setUp ( void  ) [inline, private]

Set up a matrix used for a lot of tests.

Definition at line 870 of file WMatrixFixed_test.h.

References m_matrix.

Tests the access operator for the standard storage type.

Row major storage is assumed.

Definition at line 118 of file WMatrixFixed_test.h.

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

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.

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

Definition at line 323 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 141 of file WMatrixFixed_test.h.

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

Test conversion between several matrix types.

Definition at line 491 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testCopyInstantiation ( void  ) [inline]

Instantiation with copy constructor should throw nothing.

Definition at line 68 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testDistance ( ) [inline]

Test vector distance.

Definition at line 688 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testDot ( ) [inline]

Test the dot product.

Definition at line 637 of file WMatrixFixed_test.h.

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.

Test for equality comparison of two matrices.

Definition at line 769 of file WMatrixFixed_test.h.

References m_matrix.

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

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

Check if getRowVector() returns the correct contents.

Definition at line 177 of file WMatrixFixed_test.h.

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

void WMatrixFixedTest::testIdentity ( ) [inline]

Tests the identity function.

Definition at line 282 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testInstantiation ( void  ) [inline]

Instantiation should throw nothing.

Definition at line 44 of file WMatrixFixed_test.h.

void WMatrixFixedTest::testLength ( ) [inline]

Test vector length.

Definition at line 667 of file WMatrixFixed_test.h.

Matrix addition and subtraction.

Definition at line 612 of file WMatrixFixed_test.h.

Test matrix inversion.

Definition at line 739 of file WMatrixFixed_test.h.

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

Test matrix multiplication.

Definition at line 509 of file WMatrixFixed_test.h.

Matrix-scalar multiplication.

Definition at line 587 of file WMatrixFixed_test.h.

References m_matrix.

Test vector normalization.

Definition at line 718 of file WMatrixFixed_test.h.

Test self-assignment.

Definition at line 446 of file WMatrixFixed_test.h.

References m_matrix.

Check if setColumnVector() sets the matrix contents correctly.

Definition at line 247 of file WMatrixFixed_test.h.

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

Check if setRowVector() sets the matrix contents correctly.

Definition at line 229 of file WMatrixFixed_test.h.

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

Test stream operators.

Definition at line 838 of file WMatrixFixed_test.h.

Test transpose method.

Definition at line 795 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 265 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: