Blades.Blades
— ModuleSimple 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.ZForm
— TypeZForm{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.reverse
— Methodreverse(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.:∧
— Methodconvenience 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.alld
— Methodalld(m,s)
An Array with all covector types for a given metric string s
Blades.alld
— Methodalld(modulename, n)
Array with all dual covector types where k <= n"
Blades.alle
— Methodalle(m,s)
An Array with all k-blade types for a given metric string s
Blades.alle
— Methodalle(modulename, n)
Array with all k-blade types where k <= n"
Blades.basis_1blades
— Methodbasis_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_kblades
— Methodbasis_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.factor
— Methodfactor(b)
all the smallest factors, that when wedged together create b.
Blades.grade
— Methodgrade(b)
The dimension of the subspace spanned by the blade
Blades.kform
— Methodkform(α, u)
Apply 1-form α to u.
Blades.lower
— Methodlower(k)
direct map taking all upper indices ( dual basis ) to lower indices ( standard basis ) e.g. lower(1e¹²₃) == 1e₁₂₃
Blades.magnitude
— MethodThe magnitude of a blade. Oriented.
Blades.pseudoscalar
— Methodpseudoscalar(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.raise
— Methodraise(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_basis
— Methodconvenience function to show graded basis at top-level module scope
Blades.subspace
— MethodExtract indices for basis vectors spaning the subspace of the given Blade
Blades.untype
— MethodConvert blade value to their type with parameter removed
Blades.@generate_basis
— Macro@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ʲ = δᵢʲ
Blades.AlwaysZero
— TypeAlwaysZero(): object that always returns zero when indexed
Base.:*
— Methodconvenience operator to build higher grade Blade Types. indices must be in acending order
Base.conj
— Methodconj(b)
The complex conjugate of the blade b.
Base.inv
— Methodinv(k)
Inverse of a blade when it exists. Left inverse. k*inv(k) = 1
Blades.graycodes
— Methodgray codes of length n are the rows of the returned matrix
Blades.isdualsubspace
— Methodisdualsubspace(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.tosym
— Methodimplementation specific helper. since Symbol('Main.foo') != :Main.foo need to do some name mangling
LinearAlgebra.det
— Methoddet( a, b )
The metric scalar product between two Blades of same grade. As defined in Geometric Algebra for Computer Science.