require.mx('mxjs/base/math/matrix/eigen.js');
Eigenvalues and eigenvectors solver for NxN matrices 2 <= N <= 6. The source is
http://www.akiti.ca/EigR12Solver.html.
Status | Name |
---|
Note that this module returns a function that, when called with the a number N, returns a function for solving NxN matrices. For example:
// Make Eigen3 a function for solving 3x3 matrices const Eigen3 = require.mx('mxjs/base/math/matrix/eigen.js')(3);
const eigenvalues_real = glMatrix.vec3.create(); const eigenvalues_imag = glMatrix.vec3.create(); const eigenvectors = [glMatrix.vec3.create(), glMatrix.vec3.create(), glMatrix.vec3.create()];
// assuming inputMatrix is a glMatrix.mat3 Eigen3(glMatrix.mat3.toArrays(inputMatrix), eigenvalues_real, eigenvalues_imag, eigenvectors);