pub struct CartanMatrix<const N: usize> { /* private fields */ }Expand description
Cartan matrix for a Lie algebra
The type parameter N encodes the rank at compile time.
All entries are exact integers (no floating point).
Implementations§
Source§impl<const N: usize> CartanMatrix<N>
impl<const N: usize> CartanMatrix<N>
Sourcepub const fn new(entries: [[i8; N]; N]) -> Self
pub const fn new(entries: [[i8; N]; N]) -> Self
Create a new Cartan matrix
§Examples
use atlas_embeddings::cartan::CartanMatrix;
let g2 = CartanMatrix::new([
[ 2, -3],
[-1, 2],
]);Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Check if this is a valid Cartan matrix
Verifies:
- Diagonal entries = 2
- Off-diagonal entries ≤ 0
- Symmetry condition: C[i][j] = 0 ⟺ C[j][i] = 0
Sourcepub fn is_simply_laced(&self) -> bool
pub fn is_simply_laced(&self) -> bool
Check if the Cartan matrix is simply-laced
A Cartan matrix is simply-laced if all off-diagonal entries are in {0, -1}. The simply-laced exceptional groups are E₆, E₇, E₈.
Sourcepub fn is_symmetric(&self) -> bool
pub fn is_symmetric(&self) -> bool
Check if the matrix is symmetric
A symmetric Cartan matrix corresponds to a simply-laced group.
Sourcepub fn determinant(&self) -> i64
pub fn determinant(&self) -> i64
Compute determinant of the Cartan matrix
Uses exact integer arithmetic (no floating point). For small ranks (≤ 8), uses direct computation.
Sourcepub fn num_connected_components(&self) -> usize
pub fn num_connected_components(&self) -> usize
Find connected components in Dynkin diagram
Returns the number of connected components. A connected Cartan matrix has exactly 1 component.
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check if Cartan matrix is connected (indecomposable)
Sourcepub fn to_dynkin_diagram(&self, group_name: &str) -> DynkinDiagram<N>
pub fn to_dynkin_diagram(&self, group_name: &str) -> DynkinDiagram<N>
Extract Dynkin diagram from Cartan matrix
Computes bonds between simple roots based on Cartan matrix entries. Bond multiplicity is determined by |Cᵢⱼ × Cⱼᵢ|:
- 1 = single bond (—)
- 2 = double bond (⇒) for F₄
- 3 = triple bond (≡) for G₂
§Examples
use atlas_embeddings::cartan::CartanMatrix;
let g2 = CartanMatrix::g2();
let dynkin = g2.to_dynkin_diagram("G₂");
assert_eq!(dynkin.rank(), 2);
assert_eq!(dynkin.bonds().len(), 1);
assert_eq!(dynkin.bonds()[0].2, 3); // Triple bondSource§impl CartanMatrix<2>
Standard Cartan matrices for exceptional groups
impl CartanMatrix<2>
Standard Cartan matrices for exceptional groups
Source§impl CartanMatrix<4>
impl CartanMatrix<4>
Source§impl CartanMatrix<6>
impl CartanMatrix<6>
Source§impl CartanMatrix<7>
impl CartanMatrix<7>
Source§impl CartanMatrix<8>
impl CartanMatrix<8>
Trait Implementations§
Source§impl<const N: usize> Clone for CartanMatrix<N>
impl<const N: usize> Clone for CartanMatrix<N>
Source§fn clone(&self) -> CartanMatrix<N>
fn clone(&self) -> CartanMatrix<N>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more