Crate amari_core

Crate amari_core 

Source
Expand description

High-performance Geometric Algebra/Clifford Algebra library

This crate provides the core implementation of Clifford algebras with arbitrary signatures, supporting the geometric product and related operations fundamental to geometric algebra.

§Basis Blade Indexing

Basis blades are indexed using binary representation where bit i indicates whether basis vector e_i is present in the blade. For example:

  • 0b001 (1) = e1
  • 0b010 (2) = e2
  • 0b011 (3) = e1 ∧ e2 (bivector)
  • 0b111 (7) = e1 ∧ e2 ∧ e3 (trivector)

Re-exports§

pub use error::CoreError;
pub use error::CoreResult;
pub use precision::PrecisionFloat;
pub use precision::StandardFloat;
pub use precision::ExtendedFloat;
pub use precision::ExtendedFloat as HighPrecisionFloat;
pub use cayley::CayleyTable;
pub use rotor::Rotor;

Modules§

aligned_alloc
Aligned memory allocation for SIMD-optimized operations
basis
Basis blade utilities and naming conventions
cayley
Cayley table generation and caching for efficient geometric product computation
error
Error types for core geometric algebra operations
precision
High-precision arithmetic traits for scientific computing
rotor
Rotor operations for rotations and reflections
unicode_ops
Unicode mathematical operations for Amari
verified
Formally verified geometric algebra with phantom types and Creusot annotations

Macros§

anticommutator
Anticommutator: {a, b} = (a⊗b + b⊗a)/2
commutator
Commutator: [a, b] = (a⊗b - b⊗a)/2
dot
Inner product: a • b
dual
Hodge dual: ⋆a
geo
Geometric product: a ⊗ b
grade
Grade projection: ⟨a⟩ₖ
lcon
Left contraction: a ⌟ b
norm
Magnitude/norm: ‖a‖
norm_squared
Squared magnitude: ‖a‖²
rcon
Right contraction: a ⌞ b
rev
Reverse/conjugate: a†
trop_add
Tropical addition (max): a ⊕ b
trop_mul
Tropical multiplication (addition): a ⊙ b
unit
Unit vector: â = a/‖a‖
wedge
Wedge/outer product: a ∧ b

Structs§

Bivector
Bivector type - wrapper around Multivector with only grade 2
Multivector
A multivector in a Clifford algebra Cl(P,Q,R)
Scalar
Scalar type - wrapper around Multivector with only grade 0
Vector
Vector type - wrapper around Multivector with only grade 1

Type Aliases§

E
Convenience type alias for basis vector E