Skip to content

Instantly share code, notes, and snippets.

View jipolanco's full-sized avatar

Juan Ignacio Polanco jipolanco

View GitHub Profile
using StaticArrays
using LinearAlgebra
# Compute eigendecomposition of a 3×3 Hermitian matrix.
# Uses closed-form expressions by Deledalle et al. 2017:
# https://hal.archives-ouvertes.fr/hal-01501221/document
function fast_eigen(
C::Hermitian{T, <:SMatrix{3,3,T}};
sortby::F = identity,
) where {T, F}