Function lattice_qcd_rs::utils::levi_civita
source · pub const fn levi_civita(index: &[usize]) -> Sign
Expand description
Return the levi civita symbol of the given index
Example
assert_eq!(Sign::Positive, levi_civita(&[1, 2, 3]));
assert_eq!(Sign::Negative, levi_civita(&[2, 1, 3]));
assert_eq!(Sign::Zero, levi_civita(&[2, 2, 3]));