Skip to content

Commit 4b0e871

Browse files
Merge pull request #409 from marvin-hansen/main
feat(deep_causality_multivector): Added new normalize_l2
2 parents 6cc7f6f + e623b74 commit 4b0e871

42 files changed

Lines changed: 1119 additions & 163 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deep_causality_multivector/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ path = "../deep_causality_tensor"
4040
version = "0.1"
4141

4242

43-
[dev-dependencies]
44-
criterion = {version = "0.8"}
43+
[dependencies.deep_causality_core]
44+
path = "../deep_causality_core"
45+
version = "0.0.1"
46+
4547

48+
[dev-dependencies]
49+
criterion = { version = "0.8" }
4650

4751
[[bench]]
4852
name = "multivector_bench"
@@ -84,7 +88,3 @@ path = "examples/maxwell_multivector.rs"
8488
[[example]]
8589
name = "pga3d_multivector_example"
8690
path = "examples/pga3d_multivector.rs"
87-
88-
89-
90-
[dependencies]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# CausalMultiVector Examples
2+
3+
This directory contains examples demonstrating the capabilities of the `CausalMultiVector` and its related abstractions.
4+
Each example is designed to highlight a specific engineering or scientific use case where Geometric Algebra provides a
5+
more robust, intuitive, or performant solution compared to traditional linear algebra.
6+
7+
| File | Description | Key Concepts |
8+
|----------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
9+
| [basic_multivector.rs](basic_multivector.rs) | Demonstrates the fundamental operations of Geometric Algebra, such as the geometric, outer, and inner products. | Geometric Algebra, Geometric Product, Outer Product, Inner Product |
10+
| [clifford_mhd_mulitvector.rs](clifford_mhd_mulitvector.rs) | Showcases "Metric Agnosticism" by calculating the Lorentz force in both classical (Euclidean) and relativistic (Minkowski) regimes using the same code, essential for plasma physics. | Metric Agnosticism, Plasma Physics, Lorentz Force, Euclidean vs. Minkowski |
11+
| [dixon_multivector.rs](dixon_multivector.rs) | Implements Dixon Algebra (Cl_C(6)), a structure used in high-energy particle physics to naturally encode the complex symmetries of the Standard Model. | Dixon Algebra, Particle Physics, Standard Model, Octonions |
12+
| [geometric_tilt_estimator.rs](geometric_tilt_estimator.rs) | An adaptive gravity observer that uses a Causal Monad to estimate a gravity vector, eliminating Gimbal Lock and providing a hardware-independent kernel for state estimation in robotics. | Tilt Estimation, Gimbal Lock, Causal Monad, Adaptive Observer, Robotics |
13+
| [grmhd_integration.rs](grmhd_integration.rs) | A "Multi-Physics Monad" that couples a General Relativity (GR) solver with a Magnetohydrodynamics (MHD) solver, allowing simulations to adapt their mathematical basis to physical conditions. | GRMHD, Multi-Physics, General Relativity, MHD, Causal Coupling |
14+
| [hilbert_multivector.rs](hilbert_multivector.rs) | Simulates Quantum Gates and States using `HilbertState`, leveraging the natural isomorphism between Geometric Algebra and Quantum Mechanics for verifying quantum algorithms. | Quantum Computing, Hilbert Space, Geometric Algebra, Quantum Gates |
15+
| [hkt_multivector.rs](hkt_multivector.rs) | Demonstrates how `CausalMultiVector` implements Higher-Kinded Types (Functor, Applicative, Monad) for building composable and reusable physics pipelines with "Algebraic Programming". | Higher-Kinded Types (HKT), Functor, Applicative, Monad, Algebraic Programming |
16+
| [hopf_fibration_multivector.rs](hopf_fibration_multivector.rs) | Uses the Hopf Fibration to project high-dimensional quantum states (Spinors) onto a visible 2-sphere (Bloch Sphere), aiding in Topological Data Analysis and quantum system debugging. | Hopf Fibration, Quantum Mechanics, Spinors, Topological Data Analysis |
17+
| [maxwell_multivector.rs](maxwell_multivector.rs) | Unifies Electric and Magnetic fields into a single Electromagnetic Field Bivector derived from a 4-Vector Potential, crucial for high-fidelity antenna and radar design. | Maxwell's Equations, Electromagnetism, Geometric Algebra, Vector Potential |
18+
| [pga3d_multivector.rs](pga3d_multivector.rs) | Implements Projective Geometric Algebra (PGA) to represent points, lines, and planes uniformly and uses "Motors" to handle rigid body motions in computer graphics and robotics. | Projective Geometric Algebra (PGA), Robotics, Computer Graphics, Motors |
19+

deep_causality_multivector/examples/basic_multivector.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55

66
use deep_causality_multivector::{CausalMultiVector, Metric, MultiVector};
77

8+
// -----------------------------------------------------------------------------------------
9+
// ENGINEERING VALUE:
10+
// Geometric Algebra (GA) unifies multiple mathematical systems (Complex Numbers, Quaternions,
11+
// Vector Algebra) into a single, consistent framework.
12+
//
13+
// This example demonstrates the core operations:
14+
// - Geometric Product: Combines rotation and scaling.
15+
// - Outer Product (Wedge): Represents spanned areas/volumes (subspaces).
16+
// - Inner Product (Dot): Represents projection and metric contraction.
17+
//
18+
// By using GA, engineers can write code that is more geometric, intuitive, and less prone
19+
// to coordinate-system errors common in linear algebra.
20+
// -----------------------------------------------------------------------------------------
21+
822
fn main() -> Result<(), Box<dyn std::error::Error>> {
923
println!("--- CausalMultiVector Basic Usage ---");
1024

deep_causality_multivector/examples/clifford_mhd_mulitvector.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55

66
use deep_causality_multivector::{CausalMultiVector, Metric, MultiVector};
77

8+
// -----------------------------------------------------------------------------------------
9+
// ENGINEERING VALUE:
10+
// Plasma Physics and Fusion research often involve switching between Classical (Euclidean)
11+
// and Relativistic (Minkowski) regimes. Errors in metric signatures can lead to
12+
// catastrophic simulation failures (e.g., calculating force in the wrong direction).
13+
//
14+
// This example demonstrates "Metric Agnosticism":
15+
// The same code `F = J . B` correctly calculates the Lorentz Force in BOTH regimes.
16+
// The `CausalMultiVector` type handles the underlying metric algebra (spacetime signature),
17+
// ensuring physical correctness and safety at the type level.
18+
// -----------------------------------------------------------------------------------------
19+
820
fn main() {
921
println!("--- PLASMA FUSION SIMULATION: Reactor Confinement Check ---");
1022
println!("Context: A Stationary Tokamak Reactor (e.g., ITER).");

deep_causality_multivector/examples/dixon_multivector.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
use deep_causality_multivector::{DixonAlgebra, MultiVector};
77
use deep_causality_num::Complex;
88

9+
// -----------------------------------------------------------------------------------------
10+
// ENGINEERING VALUE:
11+
// High-energy particle physics (Standard Model) relies on complex symmetries (SU(3)xSU(2)xU(1)).
12+
// Dixon Algebra (Cl_C(6)) provides a mathematical structure that naturally encodes these
13+
// symmetries using Octonions and Complex numbers.
14+
//
15+
// This example demonstrates how to construct and manipulate these high-dimensional
16+
// algebraic structures. This capability is essential for researchers modeling
17+
// Quantum Field Theory (QFT) or exploring Beyond Standard Model (BSM) physics
18+
// within a computational framework.
19+
// -----------------------------------------------------------------------------------------
20+
921
fn main() {
1022
println!("=== Dixon Algebra (Cl_C(6)) Example ===");
1123
println!("This algebra operates on Octonions in particle physics models (e.g. C. Furey).");

0 commit comments

Comments
 (0)