Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
EigenValueSymmetric.h File Reference

Go to the source code of this file.

Macros

#define JPH_EVS_ROTATE(a, i, j, k, l)
 

Functions

template<class Vector , class Matrix >
JPH_NAMESPACE_BEGIN bool EigenValueSymmetric (const Matrix &inMatrix, Matrix &outEigVec, Vector &outEigVal)
 

Macro Definition Documentation

◆ JPH_EVS_ROTATE

#define JPH_EVS_ROTATE (   a,
  i,
  j,
  k,
 
)
Value:
g = a(i, j), \
h = a(k, l), \
a(i, j) = g - s * (h + g * tau), \
a(k, l) = h + s * (g - h * tau)

Function Documentation

◆ EigenValueSymmetric()

template<class Vector , class Matrix >
JPH_NAMESPACE_BEGIN bool EigenValueSymmetric ( const Matrix inMatrix,
Matrix outEigVec,
Vector outEigVal 
)

Function to determine the eigen vectors and values of a N x N real symmetric matrix by Jacobi transformations. This method is most suitable for N < 10.

Taken and adapted from Numerical Recipes paragraph 11.1

An eigen vector is a vector v for which \(A \: v = \lambda \: v\)

Where: A: A square matrix. \(\lambda\): a non-zero constant value.

See also
https://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors

Matrix is a matrix type, which has dimensions N x N.

Parameters
inMatrixis the matrix of which to return the eigenvalues and vectors
outEigVecwill contain a matrix whose columns contain the normalized eigenvectors (must be identity before call)
outEigValwill contain the eigenvalues