Documentation ¶
Overview ¶
Package gma provides naive primitives for geometric algebra.
Index ¶
- Variables
- type Blade
- func (a Blade) Angle(b Blade) float64
- func (a Blade) Conj() Blade
- func (a Blade) Grade() int
- func (a Blade) Inverse() Blade
- func (a Blade) Invol() Blade
- func (a Blade) Lc(b Blade) Blade
- func (a Blade) Mul(b Blade) Blade
- func (a Blade) Norm() float64
- func (a Blade) NormSq() float64
- func (a Blade) Rev() Blade
- func (a Blade) String() string
- func (a Blade) Wedge(b Blade) Blade
- type Multivector
- func (a Multivector) Add(b Multivector) Multivector
- func (a Multivector) Angle(b Multivector) float64
- func (a Multivector) E1() float64
- func (a Multivector) E2() float64
- func (a Multivector) E3() float64
- func (a Multivector) Inverse() Multivector
- func (a Multivector) Lc(b Multivector) Multivector
- func (a Multivector) Mul(b Multivector) Multivector
- func (a Multivector) Norm() float64
- func (a Multivector) NormSq() float64
- func (a Multivector) Rev() Multivector
- func (a Multivector) Scalar() float64
- func (a Multivector) ScalarOf(basis uint8) float64
- func (a Multivector) ScalarProduct(b Multivector) float64
- func (a Multivector) Wedge(b Multivector) Multivector
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Blade ¶
type Blade struct { Scalar float64 // Basis is a bitmap of independent vectors, if any; vectors must be in // canonical ordering so account for sign changes of Scalar when specifying. Basis uint8 }
type Multivector ¶
type Multivector []Blade
Multivector is formally defined as a set of blades of varying grades. This package generalizes the type to also represent graded vectors. This may change in the future with explicit types. For example, instead of Multivector{{1, E1}, {1, E1}} one might use Bivector
func Rotor ¶
func Rotor(angle float64, basis uint8) Multivector
TODO for 2D, no need to sandwhich vector; see 7.3.1
func (Multivector) Add ¶
func (a Multivector) Add(b Multivector) Multivector
func (Multivector) Angle ¶
func (a Multivector) Angle(b Multivector) float64
func (Multivector) E1 ¶
func (a Multivector) E1() float64
func (Multivector) E2 ¶
func (a Multivector) E2() float64
func (Multivector) E3 ¶
func (a Multivector) E3() float64
func (Multivector) Inverse ¶
func (a Multivector) Inverse() Multivector
func (Multivector) Lc ¶
func (a Multivector) Lc(b Multivector) Multivector
func (Multivector) Mul ¶
func (a Multivector) Mul(b Multivector) Multivector
func (Multivector) Norm ¶
func (a Multivector) Norm() float64
func (Multivector) NormSq ¶
func (a Multivector) NormSq() float64
func (Multivector) Rev ¶
func (a Multivector) Rev() Multivector
func (Multivector) Scalar ¶
func (a Multivector) Scalar() float64
func (Multivector) ScalarOf ¶
func (a Multivector) ScalarOf(basis uint8) float64
func (Multivector) ScalarProduct ¶
func (a Multivector) ScalarProduct(b Multivector) float64
func (Multivector) Wedge ¶
func (a Multivector) Wedge(b Multivector) Multivector
Click to show internal directories.
Click to hide internal directories.