1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Metric signature definitions for Clifford algebras.
//!
//! This module provides the [`Signature`] trait and concrete signature types
//! that define the metric structure of different geometric algebras.
//!
//! # What is a Metric Signature?
//!
//! In a Clifford algebra, each basis vector `e_i` squares to a scalar:
//! `e_i² = +1`, `-1`, or `0`. The signature `(P, Q, R)` counts how many
//! basis vectors fall into each category:
//!
//! - `P`: Positive, `e_i² = +1` (space-like in physics)
//! - `Q`: Negative, `e_i² = -1` (time-like in physics)
//! - `R`: Zero, `e_i² = 0` (null/degenerate)
//!
//! # Available Signatures
//!
//! ## Euclidean (all positive)
//! - [`Euclidean2`]: 2D plane, `Cl(2,0,0)`
//! - [`Euclidean3`]: 3D space, `Cl(3,0,0)`
//! - [`Euclidean4`]: 4D space, `Cl(4,0,0)`
//!
//! ## Projective (Euclidean + null)
//! - [`Projective2`]: 2D PGA, `Cl(2,0,1)` - point-based formulation
//! - [`Projective3`]: 3D PGA, `Cl(3,0,1)` - point-based formulation
//!
//! ## Conformal (Euclidean + positive + negative)
//! - [`Conformal2`]: 2D CGA, `Cl(3,1,0)` - conformal model for 2D
//! - [`Conformal3`]: 3D CGA, `Cl(4,1,0)` - conformal model for 3D
//!
//! ## Coming Soon
//! - Minkowski signature for special relativity
//!
//! # Example
//!
//! ```
//! use clifford::prelude::*;
//!
//! // Query the algebra structure
//! assert_eq!(Euclidean3::DIM, 3);
//! assert_eq!(Euclidean3::num_blades(), 8);
//!
//! // All basis vectors in Euclidean space square to +1
//! assert_eq!(Euclidean3::metric(0), 1);
//! assert_eq!(Euclidean3::metric(1), 1);
//! assert_eq!(Euclidean3::metric(2), 1);
//!
//! // 3D PGA has one null vector
//! assert_eq!(Projective3::DIM, 4);
//! assert_eq!(Projective3::metric(3), 0); // e₀² = 0
//! ```
pub use ;
pub use ;
pub use Signature;
pub use ;