Grassmann.jl Library
AbstractTensors.Manifold
AbstractTensors.TV
AbstractTensors.TensorAlgebra
AbstractTensors.TensorGraded
AbstractTensors.TensorMixed
AbstractTensors.TensorTerm
AbstractTensors._InitialValue
DirectSum.Basis
DirectSum.ExtendedBasis
DirectSum.Simplex
DirectSum.SparseBasis
DirectSum.SubManifold
DirectSum.TensorBundle
Grassmann.Chain
Grassmann.ChainBundle
Grassmann.MultiVector
AbstractLattices.:β§
AbstractLattices.:β¨
AbstractTensors.:β
AbstractTensors.:β
AbstractTensors.:β
AbstractTensors.:β
AbstractTensors._size
AbstractTensors.bivector
AbstractTensors.clifford
AbstractTensors.complementleft
AbstractTensors.complementlefthodge
AbstractTensors.contraction
AbstractTensors.involute
AbstractTensors.mdims
AbstractTensors.same_size
AbstractTensors.scalar
AbstractTensors.trivector
AbstractTensors.values
AbstractTensors.valuetype
AbstractTensors.vector
AbstractTensors.volume
Base.:&
Base.:*
Base.:<<
Base.:>>
Base.:>>>
Base.:~
Base.conj
Base.imag
Base.real
DirectSum.alloc
DirectSum.getbasis
Grassmann.betti
Leibniz.complementright
Leibniz.complementrighthodge
Leibniz.getbasis
Leibniz.Ο
LinearAlgebra.cross
LinearAlgebra.dot
LinearAlgebra.rank
DirectSum.@basis
DirectSum.@dualbasis
DirectSum.@mixedbasis
AbstractTensors.Manifold
β TypeManifold{V} <: TensorAlgebra{V}
Basis parametrization locally homeomorphic to β^n
product topology.
AbstractTensors.TV
β TypeTV[ elements ]
TV{T}[ elements ]
Create Values
literals using array construction syntax. The element type is inferred by promoting elements
to a common type or set to T
when T
is provided explicitly.
Examples:
TV[1.0, 2.0]
creates a length-2Values
ofFloat64
elements.TV{Float32}[1, 2]
creates a length-2Values
ofFloat32
elements.
A couple of helpful type aliases are also provided:
TV_F64[1, 2]
creates a lenght-2Values
ofFloat64
elementsTV_F32[1, 2]
creates a lenght-2Values
ofFloat32
elements
AbstractTensors.TensorAlgebra
β TypeTensorAlgebra{V} <: Number
Universal root tensor type with Manifold
instance parameter V
.
AbstractTensors.TensorGraded
β TypeTensorGraded{V,G} <: Manifold{V} <: TensorAlgebra
Graded elements of a TensorAlgebra
in a Manifold
topology.
AbstractTensors.TensorMixed
β TypeTensorMixed{V} <: TensorAlgebra{V}
Elements of TensorAlgebra
having non-homogenous grade.
AbstractTensors.TensorTerm
β TypeTensorTerm{V,G} <: TensorGraded{V,G}
Terms of a TensorAlgebra
having a single coefficient.
AbstractTensors._InitialValue
β Type_InitialValue
A singleton type for representing "universal" initial value (identity element).
The idea is that, given op
for mapfoldl
, virtually, we define an "extended" version of it by
opβ²(::_InitialValue, x) = x
opβ²(acc, x) = op(acc, x)
This is just a conceptually useful model to have in mind and we don't actually define opβ²
here (yet?). But see Base.BottomRF
for how it might work in action.
(It is related to that you can always turn a semigroup without an identity into a monoid by "adjoining" an element that acts as the identity.)
AbstractTensors._size
β MethodReturn either the statically known Val() or runtime length()
AbstractTensors.bivector
β Functionbivector(::TensorAlgebra)
Return the bivector (rank 2) part of any TensorAlgebra
element.
AbstractTensors.mdims
β Methodmdims(t::TensorAlgebra{V})
Dimensionality of the pseudoscalar V
of that TensorAlgebra
.
AbstractTensors.same_size
β MethodReturns the common Val of the inputs (or else throws a DimensionMismatch)
AbstractTensors.scalar
β Functionscalar(::TensorAlgebra)
Return the scalar (rank 0) part of any TensorAlgebra
element.
AbstractTensors.trivector
β Functiontrivector(::TensorAlgebra)
Return the trivector (rank 3) part of any TensorAlgebra
element.
AbstractTensors.values
β Methodvalues(::TensorAlgebra)
Returns the internal Values
representation of a TensorAlgebra
element.
AbstractTensors.valuetype
β Methodvaluetype(t::TensorAlgebra)
Returns type of a TensorAlgebra
element value's internal representation.
AbstractTensors.vector
β Functionvector(::TensorAlgebra)
Return the vector (rank 1) part of any TensorAlgebra
element.
AbstractTensors.volume
β Methodpseudoscalar(::TensorAlgebra)
Return the pseudoscalar (full rank) part of any TensorAlgebra
element.
LinearAlgebra.rank
β Methodrank(::Manifold{n})
Dimensionality n
of the Manifold
subspace representation.
DirectSum.Basis
β TypeDirectSum.Basis{V} <: SubAlgebra{V} <: TensorAlgebra{V}
Grassmann basis container with cache of SubManifold
elements and their Symbol
names.
DirectSum.ExtendedBasis
β TypeDirectSum.ExtendedBasis{V} <: SubAlgebra{V} <: TensorAlgebra{V}
Grassmann basis container without a dedicated SubManifold
cache (only lazy caching).
DirectSum.Simplex
β TypeSimplex{V,G,B,π} <: TensorTerm{V,G} <: TensorGraded{V,G}
Simplex type with pseudoscalar V::Manifold
, grade/rank G::Int
, B::SubManifold{V,G}
, field π::Type
.
DirectSum.SparseBasis
β TypeDirectSum.SparseBasis{V} <: SubAlgebra{V} <: TensorAlgebra{V}
Grassmann basis with sparse cache of SubManifold{G,V}
elements and their Symbol
names.
DirectSum.SubManifold
β TypeSubManifold{V,G,B} <: TensorGraded{V,G} <: Manifold{G}
Basis type with pseudoscalar V::Manifold
, grade/rank G::Int
, bits B::UInt64
.
DirectSum.TensorBundle
β TypeTensorBundle{n,β,g,Ξ½,ΞΌ} <: Manifold{n}
Let n
be the rank of a Manifold{n}
. The type TensorBundle{n,β,g,Ξ½,ΞΌ}
uses byte-encoded data available at pre-compilation, where β
specifies the basis for up and down projection, g
is a bilinear form that specifies the metric of the space, and ΞΌ
is an integer specifying the order of the tangent bundle (i.e. multiplicity limit of Leibniz-Taylor monomials). Lastly, Ξ½
is the number of tangent variables.
DirectSum.alloc
β Functionbasis(V::Manifold,:V,"v","w","β","Ο΅")
Generates Basis
declaration having Manifold
specified by V
. The first argument provides pseudoscalar specifications, the second argument is the variable name for the Manifold
, and the third and fourth argument are variable prefixes of the SubManifold
vector names (and covector basis names).
DirectSum.getbasis
β Methodgetbasis(V::Manifold,v)
Fetch a specific SubManifold{G,V}
element from an optimal SubAlgebra{V}
selection.
DirectSum.@basis
β Macro@basis
Generates SubManifold
elements having Manifold
specified by V
. As a result of this macro, all of the SubManifold{V,G}
elements generated by that TensorBundle
become available in the local workspace with the specified naming. The first argument provides pseudoscalar specifications, the second argument is the variable name for the Manifold
, and the third and fourth argument are variable prefixes of the SubManifold
vector names (and covector basis names). Default for @basis M
is @basis M V v w β Ο΅
.
DirectSum.@dualbasis
β Macro@dualbasis
Generates SubManifold
elements having Manifold
specified by V'
. As a result of this macro, all of the SubManifold{V',G}
elements generated by that TensorBundle
become available in the local workspace with the specified naming. The first argument provides pseudoscalar specifications, the second argument is the variable name for the dual Manifold
, and the third and fourth argument are variable prefixes of the SubManifold
covector names (and tensor field basis names). Default for @dualbasis M
is @dualbasis M VV w Ο΅
.
DirectSum.@mixedbasis
β Macro@mixedbasis
Generates SubManifold
elements having Manifold
specified by VβV'
. As a result of this macro, all of the SubManifold{VβV',G}
elements generated by that TensorBundle
become available in the local workspace with the specified naming. The first argument provides pseudoscalar specifications, the second argument is the variable name for the Manifold
, and the third and fourth argument are variable prefixes of the SubManifold
vector names (and covector basis names). Default for @mixedbasis M
is @mixedbasis M V v w β Ο΅
.
Grassmann.Chain
β MethodChain{V,G,π} <: TensorGraded{V,G}
Chain type with pseudoscalar V::Manifold
, grade/rank G::Int
, scalar field π::Type
.
Grassmann.ChainBundle
β TypeChainBundle{V,G,P} <: Manifold{V} <: TensorAlgebra{V}
Subsets of a bundle cross-section over a Manifold
topology.
Grassmann.MultiVector
β MethodMultiVector{V,π} <: TensorMixed{V} <: TensorAlgebra{V}
Chain type with pseudoscalar V::Manifold
and scalar field π::Type
.
AbstractLattices.:β§
β Methodβ§(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Exterior product as defined by the anti-symmetric quotient Ξβ‘β/~
AbstractLattices.:β¨
β Methodβ¨(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Regressive product as defined by the DeMorgan's law: β¨(Ο...) = ββ»ΒΉ(β§(β.(Ο)...))
AbstractTensors.:β
β Functionβ(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Reversed geometric product: ΟβΞ· = (~Ο)*Ξ·
AbstractTensors.:β
β Functionβ(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
General sandwich product: ΟβΞ· = involute(Ξ·)\ΟβΞ·
For normalized even grade Ξ· it is ΟβΞ· = (~Ξ·)βΟβΞ·
AbstractTensors.:β
β Methodβ(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Symmetrization projection: β(Ο...) = β(β(Ο.(Ο)...))/factorial(length(Ο))
AbstractTensors.:β
β Methodβ (Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Anti-symmetrization projection: β (Ο...) = β(β(ΟΟ.(Ο)...))/factorial(length(Ο))
AbstractTensors.contraction
β Methodcontraction(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Interior (right) contraction product: Οβ Ξ· = Οβ¨βΞ·
Base.:&
β Functionβ¨(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Regressive product as defined by the DeMorgan's law: β¨(Ο...) = ββ»ΒΉ(β§(β.(Ο)...))
Base.:*
β Method*(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Geometric algebraic product: ΟβΞ· = (-1)α΅det(Οβ©Ξ·)β(Ξ(ΟβΞ·)βͺL(ΟβΞ·))
Base.:<<
β Functionβ(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Symmetrization projection: β(Ο...) = β(β(Ο.(Ο)...))/factorial(length(Ο))
Base.:>>
β Functionβ (Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Anti-symmetrization projection: β (Ο...) = β(β(ΟΟ.(Ο)...))/factorial(length(Ο))
Base.:>>>
β Function>>>(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Sandwich product: Ο>>>Ξ· = ΟβΞ·β(~Ο)
Grassmann.betti
β Methodbetti(::TensorAlgebra)
Compute the Betti numbers.
LinearAlgebra.cross
β Functioncross(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Cross product: ΟΓΞ· = β(Οβ§Ξ·)
LinearAlgebra.dot
β Functiondot(Ο::TensorAlgebra,Ξ·::TensorAlgebra)
Interior (right) contraction product: Οβ Ξ· = Οβ¨βΞ·
AbstractTensors.clifford
β Functionclifford(Ο::TensorAlgebra)
Clifford conjugate of an element: clifford(Ο) = involute(conj(Ο))
AbstractTensors.complementleft
β Functioncomplementleft(::TensorAlgebra)
Non-metric variant Grassmann-Poincare left complement.
AbstractTensors.complementlefthodge
β Functioncomplementlefthodge(Ο::TensorAlgebra)
Grassmann-Poincare left complement: β'Ο = Iβ'Ο
AbstractTensors.involute
β Functioninvolute(Ο::TensorAlgebra)
Involute of an element: ~Ο = (-1)^grade(Ο)*Ο
Base.:~
β Methodreverse(Ο::TensorAlgebra)
Reverse of an element: ~Ο = (-1)^(grade(Ο)(grade(Ο)-1)/2)Ο
Base.conj
β Function~(Ο::TensorAlgebra)
Reverse of an element: ~Ο = (-1)^(grade(Ο)(grade(Ο)-1)/2)Ο
Base.imag
β Methodimag(Ο::TensorAlgebra)
The imag
part (Ο-(~Ο))/2
is defined by abs2(imag(Ο)) == -(imag(Ο)^2)
.
Base.real
β Methodreal(Ο::TensorAlgebra)
The real
part (Ο+(~Ο))/2
is defined by abs2(real(Ο)) == real(Ο)^2
.
Leibniz.complementright
β Functioncomplementright(::TensorAlgebra)
Non-metric variant of Grassmann-Poincare-Hodge complement.
Leibniz.complementrighthodge
β Functioncomplementrighthodge(Ο::TensorAlgebra)
Grassmann-Poincare-Hodge complement: βΟ = ΟβI
Leibniz.getbasis
β Methodgetbasis(V::Manifold,v)
Fetch a specific SubManifold{G,V}
element from an optimal SubAlgebra{V}
selection.
Leibniz.Ο
β MethodΟ(::TensorAlgebra)
Compute the Euler characteristic Ο = ββ(-1)α΅bβ.