API reference
SimpleGA.CGA
SimpleGA.GA20
SimpleGA.GA24
SimpleGA.GA30
SimpleGA.GA31
SimpleGA.GA3232
SimpleGA.GA33
SimpleGA.GA40
SimpleGA.GA44
SimpleGA.PGA
SimpleGA.Quaternions
SimpleGA.STA
SimpleGA.project
Core functions
SimpleGA.project
— Functionproject(multivector::T, n::Integer) -> T
Project 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
— ModuleGA41
Code for GA(4,1). implementation is via 2x2 quaternion matrices.
SimpleGA.GA20
— ModuleGA20
Module representing the GA(2, 0)
geometric algebra. Even and odd elements are stored as complex numbers.
SimpleGA.GA24
— ModuleGA24
Module 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
— ModuleGA30
Module representing the GA(3, 0) geometric algebra. Underlying rep is quaternions, but not used explicitly here to keep this code self-contained.
SimpleGA.GA31
— ModuleGA31
Code for GA(3,1). Even and odd elements are stored as complex structs. 2x2 matrix products are unwrapped.
SimpleGA.GA33
— ModuleGA33
Module for GA(3,3). Base representation is a pair of 4x4 static arrays.
SimpleGA.GA40
— ModuleGA40
Code for GA(4,0). Even and odd elements are stored as quaternion pairs.
SimpleGA.GA44
— ModuleGA44
Uses a list-based approach to multivector storage. Not as fast as smaller algebras, but useful for checks.
SimpleGA.GA3232
— ModuleGA3232
Module 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
— ModulePGA
Code for GA(3,0,1). The Euclidean group algebra. C Core representation is a quaternion pair.
SimpleGA.STA
— ModuleSTA
Code 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
— ModuleQuaternions
Quaternion 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.