Blades.BladesModule

Simple k-vectors formed from the wedge product starting with orthogonal 1-vector basis. Simple bivectors, trivectors, etc.

Types for blades are generated as a unique type for each different k-vector with acending indices i.e. e₁, e₂, e₁₂

Equipped with a metric such that eᵢ⋅eᵢ = {1,-1,0} depending on if the metric is +,-, or 0

product of parallel basis eᵢ*eⱼ == eᵢ⋅eⱼ when i=j

product of orthogonal basis eᵢeⱼ == eᵢ∧eⱼ == -eⱼeᵢ when i≠j

operators:

  • geometric product

∧ wedge/exterior product -+ subraction, addition between blades of same type (span the same subspace ) !,⟂ orthogonal complement ~ reverse ⋆ Hodge star

Blades.ZFormType
ZForm{D}(f,df)

Differential 0-form Represents a scalar function to be evaluated at a point. Takes a vector returns a scalar. df is a list of partial The index is that of the coordinate basis 1-form D is the dimensionality of the coordinate basis 1-forms

Example: julia> dist(x,y) = ZForm(()->(sqrt(x^2+y^2)), (i)->[x/sqrt(x^2+y^2), y/sqrt(x^2+y^2)][i])

julia> dist(1.0,-1.0).df(2) -0.7071067811865475

julia> dist(1.0,-1.0).df(1) 0.7071067811865475

julia> dist(1.0,-1.0).f() 1.4142135623730951

Base.reverseMethod
reverse(b)

Blade constructed with reversed order of basis vectors. i.e. reverse(e₁∧e₂∧e₃) = e₃∧e₂∧e₁

Blades.:∧Method
∧(a,b)

Wedge product between two blades

Blades.:∧Method

convenience operator to build higher grade Blade Types. indices must be in acending order

Blades.:⋆Method
⋆(k, 𝑖)

Hodge star operator mapping k to it's Hodge dual relative to a given psuedovector 𝑖. Defined by k∧⋆(k) == (k⋅k)*𝑖 where k is generated from orthonormal 1-vectors. 𝑖 is the unit psuedoscalar for a subspace containing k.

Blades.:⋆Method
⋆(k)

Hodge star operator mapping k to it's Hodge dual. Defined by k∧⋆(k) == 𝐼 where k is generated from orthonormal 1-vectors and 𝐼 is the psuedoscalar for the generating vector space.

Blades.:⟂Method
⟂(b)

The orthogonal complement of this blade against the pseudoscalar I.

defined as k*I⁻¹

If the metric is degenerate, the non-metric duality mapping dual(b) should be used instead.

Blades.alldMethod
alld(m,s)

An Array with all covector types for a given metric string s

Blades.alldMethod
alld(modulename, n)

Array with all dual covector types where k <= n"

Blades.alleMethod
alle(m,s)

An Array with all k-blade types for a given metric string s

Blades.alleMethod
alle(modulename, n)

Array with all k-blade types where k <= n"

Blades.basis_1bladesMethod
basis_kblades(k)

a list of all basis 1-blades for the algebra k belongs to.

i.e. basis_1blades(e₁) will depend the dimension of the algebra e₁ was generated in

Blades.basis_kbladesMethod
basis_kblades(k, n)

a list of all basis blades of degree n for the algebra k belongs to.

i.e. basis_kblades(e₁, 2) will depend the dimension of the algebra e₁ was generated in

Blades.factorMethod
factor(b)

all the smallest factors, that when wedged together create b.

Blades.gradeMethod
grade(b)

The dimension of the subspace spanned by the blade

Blades.lowerMethod
lower(k)

direct map taking all upper indices ( dual basis ) to lower indices ( standard basis ) e.g. lower(1e¹²₃) == 1e₁₂₃

Blades.pseudoscalarMethod
pseudoscalar(A)

The pseudoscalar associated with algebra of blade A. The pseudoscalar is the singleton blade that spans the entire space. The highest grade blade in the algebra.

Blades.raiseMethod
raise(k)

direct map taking all lower indices ( standard basis ) to upper indices ( dual basis ) e.g. raise(1e¹²₃) == 1e¹²³ assumes you have generated a dual basis, i.e. @generate_basis("...", _, true)

Blades.show_basisMethod

convenience function to show graded basis at top-level module scope

Blades.subspaceMethod

Extract indices for basis vectors spaning the subspace of the given Blade

Blades.untypeMethod

Convert blade value to their type with parameter removed

Blades.@generate_basisMacro
@generate_basis(s, [export_types, generate_reciprocals, zero_mixed_index])

generate types for basis Blades and algebra given a string encoding the desired metric. example metric strings : "+++" for 3D space "-+++" for minkowski spacetime "0+++" 3D projective space ( homegeneous coords )

Optional boolean parameters: export_types - export the basis types into calling module scope

generate_reciprocals - generate reciprocal basis types with raised indices for all grades

zeromixedindex - any operator that results in a blade with mixed dual and primal indices will be set to zero. You want this true when working with differential k-forms where eᵢ*eʲ = δᵢʲ

Base.:*Method

convenience operator to build higher grade Blade Types. indices must be in acending order

Base.conjMethod
conj(b)

The complex conjugate of the blade b.

Base.invMethod
inv(k)

Inverse of a blade when it exists. Left inverse. k*inv(k) = 1

Blades.graycodesMethod

gray codes of length n are the rows of the returned matrix

Blades.isdualsubspaceMethod
isdualsubspace(b)

array where value is 1 if the corresponding subspace basis vector is from dualspace of the given Blade length of array is k where k is the grade of the Blade

Blades.tosymMethod

implementation specific helper. since Symbol('Main.foo') != :Main.foo need to do some name mangling

LinearAlgebra.detMethod

det( a, b )

The metric scalar product between two Blades of same grade. As defined in Geometric Algebra for Computer Science.