API reference
SimpleGA.CGASimpleGA.GA20SimpleGA.GA24SimpleGA.GA30SimpleGA.GA31SimpleGA.GA3232SimpleGA.GA33SimpleGA.GA40SimpleGA.GA44SimpleGA.PGASimpleGA.QuaternionsSimpleGA.STASimpleGA.project
Core functions
SimpleGA.project — Functionproject(multivector::T, n::Integer) -> TProject a given multivector of type T so that only the component of grade n is kept.
The function will always return a multivector of the same type as that passed in. If n is such that multivector does not contain this grade (e.g. because n is odd, and the multivector is an even type), then we will return a zero multivector.
Modules
There is one submodule for each algebra we support. These are listed below:
SimpleGA.CGA — ModuleGA41Code for GA(4,1). implementation is via 2x2 quaternion matrices.
SimpleGA.GA20 — ModuleGA20Module representing the GA(2, 0) geometric algebra. Even and odd elements are stored as complex numbers.
SimpleGA.GA24 — ModuleGA24Module representing the GA(2,4) geometric algebra.
This is the conformal algebra for spacetime. Even and odd elements are stored as complex Static Arrays.
SimpleGA.GA30 — ModuleGA30Module representing the GA(3, 0) geometric algebra. Underlying rep is quaternions, but not used explicitly here to keep this code self-contained.
SimpleGA.GA31 — ModuleGA31Code for GA(3,1). Even and odd elements are stored as complex structs. 2x2 matrix products are unwrapped.
SimpleGA.GA33 — ModuleGA33Module for GA(3,3). Base representation is a pair of 4x4 static arrays.
SimpleGA.GA40 — ModuleGA40Code for GA(4,0). Even and odd elements are stored as quaternion pairs.
SimpleGA.GA44 — ModuleGA44Uses a list-based approach to multivector storage. Not as fast as smaller algebras, but useful for checks.
SimpleGA.GA3232 — ModuleGA3232Module representing the GA(32,32) geometric algebra.
Not optimised in any way, but useful for some experimentation. Use with caution. GA(32,32) is very BIG!
SimpleGA.PGA — ModulePGACode for GA(3,0,1). The Euclidean group algebra. C Core representation is a quaternion pair.
SimpleGA.STA — ModuleSTACode for GA(1,3). Even and odd elements are stored as complex structs. 2x2 matrix products are unwrapped. Gamma and sigma used for pretty typing.
Quaternions
SimpleGA.Quaternions — ModuleQuaternionsQuaternion code. This is called by some of the later GA implementations.
The core mirrors much of the GA code structure. For completeness we have defined a division operation for quaternions as they are a division algebra.