This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |