OpenWalnut  1.2.5
Public Member Functions | Private Member Functions
WTensorFunctionsTest Class Reference

Test class for some tensor functions. More...

#include <WTensorFunctions_test.h>

+ Inheritance diagram for WTensorFunctionsTest:

List of all members.

Public Member Functions

void testSpecialSymMatrixEigenvalueTestCaseNumericalStability (void)
 The eigenvalue of the symmetrical matrix: 0.000179516, 2.09569e-05, 2.76557e-06, 0.000170189, -5.52619e-07, 0.00015239 (0.000196397;0.000155074;0.000150625)
void testJacobiEigenvectors ()
 Test the jacobi eigenvector calculation.
void testCardanoEigenvalues ()
 Test the cardano eigenvalue calculation.

Private Member Functions

template<std::size_t dim, typename Data_T >
WTensorSym< 2, dim, Data_T > similarity_rotate_givens (WTensorSym< 2, dim, Data_T > const &m, std::size_t i, std::size_t j, double angle)
 A helper function performing a similarity transform using a givens rotation.
template<std::size_t dim, typename Data_T >
void compare_results (WTensorSym< 2, dim, Data_T > const &m, RealEigenSystem const &sys)
 Test if the given vectors are eigenvectors to the given eigenvalues of a symmetric matrix.

Detailed Description

Test class for some tensor functions.

Definition at line 42 of file WTensorFunctions_test.h.


Member Function Documentation

template<std::size_t dim, typename Data_T >
void WTensorFunctionsTest::compare_results ( WTensorSym< 2, dim, Data_T > const &  m,
RealEigenSystem const &  sys 
) [inline, private]

Test if the given vectors are eigenvectors to the given eigenvalues of a symmetric matrix.

Parameters:
mA symmetric matrix.
sysThe eigen system ( eigenvalues and eigenvectors )

Definition at line 528 of file WTensorFunctions_test.h.

Referenced by testJacobiEigenvectors().

template<std::size_t dim, typename Data_T >
WTensorSym< 2, dim, Data_T > WTensorFunctionsTest::similarity_rotate_givens ( WTensorSym< 2, dim, Data_T > const &  m,
std::size_t  i,
std::size_t  j,
double  angle 
) [inline, private]

A helper function performing a similarity transform using a givens rotation.

Parameters:
mThe symmetric tensor to transform.
iA row index.
jA column index.
angleThe rotation angle (in radians).
Notes:
i must not have the same values as j
Returns:
The new tensor

Definition at line 482 of file WTensorFunctions_test.h.

Referenced by testCardanoEigenvalues(), and testJacobiEigenvectors().

Test the cardano eigenvalue calculation.

Definition at line 307 of file WTensorFunctions_test.h.

References similarity_rotate_givens().

Test the jacobi eigenvector calculation.

Definition at line 70 of file WTensorFunctions_test.h.

References compare_results(), and similarity_rotate_givens().

The eigenvalue of the symmetrical matrix: 0.000179516, 2.09569e-05, 2.76557e-06, 0.000170189, -5.52619e-07, 0.00015239 (0.000196397;0.000155074;0.000150625)

Definition at line 50 of file WTensorFunctions_test.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends