• incanter

# decomp-eigenvalue

## incanter.core

• (decomp-eigenvalue mat)
Returns the Eigenvalue Decomposition of the given matrix. Equivalent to R's eig function.

Returns:
a map containing:
:values -- vector of eigenvalues
:vectors -- the matrix of eigenvectors

Examples:

(use 'incanter.core)
(def foo (matrix (range 9) 3))
(decomp-eigenvalue foo)

References:
http://en.wikipedia.org/wiki/Eigenvalue_decomposition
http://incanter.org/docs/parallelcolt/api/cern/colt/matrix/tdouble/algo/decomposition/DoubleEigenvalueDecomposition.html

### Source incanter/core.clj:919 top

```(defn decomp-eigenvalue
" Returns the Eigenvalue Decomposition of the given matrix. Equivalent to R's eig function.

Returns:
a map containing:
:values -- vector of eigenvalues
:vectors -- the matrix of eigenvectors

Examples:

(use 'incanter.core)
(def foo (matrix (range 9) 3))
(decomp-eigenvalue foo)

References:
http://en.wikipedia.org/wiki/Eigenvalue_decomposition
http://incanter.org/docs/parallelcolt/api/cern/colt/matrix/tdouble/algo/decomposition/DoubleEigenvalueDecomposition.html
"
([mat]
(let [result (DenseDoubleEigenvalueDecomposition. mat)]
{:values (diag (Matrix. (.getD result)))
:vectors (Matrix. (.getV result))})))```
Vars in incanter.core/decomp-eigenvalue: defn let
Used in 0 other vars