Exported symbols from CliffordAlgebras.jl
:
Base.:*
— Methoda * b
Calculates the geometric product of two MultiVectors a and b.
Base.:/
— Methoda / b
(/)(a::MultiVector{CA}, b::MuliVector{CA}) where CA
Calculates the MultiVector quotient a/b by evaluating a*inv(b).
Base.:\
— Methodb \ a
(\)(b::MultiVector{CA}, b::MuliVector{CA}) where CA
Calculates the MultiVector quotient a/b by evaluating inv(b)*a.
Base.:~
— Method~a
(~)(::MultiVector)
Returns the reversed MultiVector reverse(a).
Base.conj
— Methodconj(mv::MultiVector)
Return the conjugate of the MultiVector, i.e. reverse(grin(mv)).
Base.inv
— Methodinv(::MultiVector)
Finds the inverse of the MultiVector. If no inverse exists a SingularException is thrown.
Base.isapprox
— Methodisapprox(mv1::MultiVector, mv2::MultiVector; kw...)
Check if mv1
and mv2
belong to the same algebra and their coefficients are close.
Base.reverse
— Methodreverse(::MultiVector)
Returns the MultiVector that has all the basis vector products reversed.
CliffordAlgebras.:×₊
— Methoda ×₊ b
Calculates the anti-commutator ab+ba of two MultiVectors a and b.
CliffordAlgebras.:×₋
— Methoda ×₋ b
Calculates the commutator ab-ba of two MultiVectors a and b.
CliffordAlgebras.:∧
— Methoda ∧ b
Calculates the wedge product between two MultiVectors a and b.
CliffordAlgebras.:∨
— Methoda ∨ b
Calculates the regressive product of the MultiVectors a and b.
CliffordAlgebras.:≀
— Methoda ≀ b
Calculates the sandwich product a*b*reverse(a)
for two MultiVectors a and b.
CliffordAlgebras.:⋅
— Methoda ⋅ b
Calculates the "fat dot" product between the MultiVectors a and b.
CliffordAlgebras.:⋆
— Methoda ⋆ b
Calculates the scalar product of the MultiVectors a and b.
CliffordAlgebras.:⨼
— Methoda ⨼ b
Calculates the left contraction of the MultiVectors a and b.
CliffordAlgebras.:⨽
— Methoda ⨽ b
Calculates the right contraction of the MultiVectors a and b.
CliffordAlgebras.algebra
— Methodalgebra(::MultiVector)
algebra(::Type{<:MultiVector})
Returns the CliffordAlgebra instance to which the MultiVector belongs.
CliffordAlgebras.baseindices
— Methodbaseindices(::MultiVector)
baseindices(::Type{<:MultiVector})
Returns the indices for the sparse MultiVector basis.
CliffordAlgebras.basesymbol
— Methodbasesymbol(::CliffordAlgebra, n::Integer)
basesymbol(::Type{<:CliffordAlgebra}, n::Integer)
Returns the symbol used for the n-th basis multivector of the algebra.
CliffordAlgebras.basevector
— Methodbasevector(::CliffordAlgebra, n::Integer)
basevector(::Type{<:CliffordAlgebra}, n::Integer)
Returns the n-th basis MultiVector of the given CliffordAlgebra.
CliffordAlgebras.basevector
— Methodbasevector(::CliffordAlgebra, name::Symbol)
basevector(::Type{<:CliffordAlgebra}, name::Symbol)
Returns the basis MultiVector with the specified name from the given Clifford Algebra.
CliffordAlgebras.cayleytable
— Methodcaleytable(io::IO, ca::CliffordAlgebra)
caleytable(io::IO, CA::Type{<:CliffordAlgebra})
Generates a Cayley table view of the algebra.
CliffordAlgebras.character
— Methodcharacter(::CliffordAlgebra)
character(::Type{<:CliffordAlgebra})
Returns the square of the pseudoscalar of the algebra.
CliffordAlgebras.coefficient
— Methodcoefficient(::MultiVector, n::Integer)
Returns the multivector coefficients for the n-th basis vector. Returns 0 if n is out of bounds.
CliffordAlgebras.coefficient
— Methodcoefficient(::MultiVector, s::Symbol)
Returns the multivector coefficients for the basis vector belonging to the symbol s. Returns 0 if the symbol is not a valid basis symbol.
CliffordAlgebras.coefficients
— Methodcoefficients(::MultiVector)
Returns the sparse coefficients of the MultiVector.
CliffordAlgebras.dimension
— Methoddimension(::CliffordAlgebra)
dimension(::Type{<:CliffordAlgebra})
Returns the dimension of the algebra, i.e. the number of coefficients in a general multivector.
CliffordAlgebras.dual
— Methoddual(mv::MultiVector)
Returns the Poincaré dual of the MultiVector, such that for all basis MultiVectors mv * dual(mv) = pseudoscalar. Dual is a linear map and the images of other MultiVectors follow from the images of the basis MultiVectors.
CliffordAlgebras.even
— Methodeven(::MultiVector)
Returns the even grade projection of the MultiVector.
CliffordAlgebras.extend
— Methodextend(::MultiVector)
Returns a new MultiVector with a non-sparse coefficient coding. This can be useful to manage type stability.
CliffordAlgebras.grade
— Methodgrade(::MultiVector, k::Integer)
Projects the MultiVector onto the k-vectors.
CliffordAlgebras.grin
— Methodgrin(mv::MultiVector)
Returns the grade involution of the MultiVector, i.e. even(mv) - odd(mv).
CliffordAlgebras.isgrade
— Methodisgrade(::MultiVector, k::Integer)
Returns true if the MultiVector is of grade k, false if not.
CliffordAlgebras.matrix
— Methodmatrix(::MultiVector)
Returns the matrix algebra representation of the MultiVector.
CliffordAlgebras.maxgrade
— Methodmaxgrade(::MultiVector ; rtol = 1e-8)
Projects the MultiVector onto the subspace of the largest grade with non-vanishing norm. Returns a tuple of the resulting multivector and its grade.
CliffordAlgebras.mingrade
— Methodmingrade(::MultiVector ; rtol = 1e-8)
Projects the MultiVector onto the subspace of the largest grade with non-vanishing norm. Returns a tuple of the resulting multivector and its grade.
CliffordAlgebras.odd
— Methododd(::MultiVector)
Returns the odd grade projection of the MultiVector.
CliffordAlgebras.order
— Methodorder(::CliffordAlgebra)
order(::Type{<:CliffordAlgebra})
Returns the order of the algebra. The order is the sum of the signature and the dimension of the underlying 1-vector space and the maximum grade for multivectors.
CliffordAlgebras.outermorphism
— Methodoutermorphism(A::AbstractMatrix, mv::MultiVector)
Calculates the outermorphism f of the MultiVector defined by f(v) = Av if v is in the grade-1 subspace of the algebra.
CliffordAlgebras.polarize
— Methodpolarize(mv::MultiVector)
mv'
Calculates the polarization of the MultiVector, i.e. mv * pseudoscalar
.
CliffordAlgebras.prune
— Methodprune(::MultiVector ; rtol = 1e-8 )
Returns a new MultiVector with all basis vectors removed from the sparse basis whose coefficients fall below the relative magnitude threshold. This function is not type stable, because the return type depends on the sparse basis.
CliffordAlgebras.pseudoscalar
— Methodpseudoscalar(::CliffordAlgebra)
pseudoscalar(::Type{<:CliffordAlgebra})
Returns the pseudoscalar of the given algebra.
CliffordAlgebras.scalar
— Methodscalar(mv::MultiVector)
Returns the scalar component of the multivector. The result if of the internal storage type eltype(mv).
CliffordAlgebras.signature
— Methodsignature(::CliffordAlgebra)
signature(::Type{<:CliffordAlgebra})
Returns the signature of the algebra.
CliffordAlgebras.signaturetable
— Methodsignaturetable(io::IO, ca::CliffordAlgebra)
signaturetable(io::IO, CA::Type{<:CliffordAlgebra})
Prints the 1-vector basis symbols and their squares.
CliffordAlgebras.vector
— Methodvector(::MultiVector)
Returns the non-sparse vector representation of the MutliVector.
CliffordAlgebras.Λᵏ
— MethodΛᵏ(::MultiVector, ::Val{k}) where k
Λᵏ(::MultiVector, k::Integer)
Projects the MultiVector onto k-vectors. Similar to grade(mv,k), but uses @generated code and compile time optimizations.
LinearAlgebra.norm
— Methodnorm(::MultiVector)
Calculates the MultiVector norm defined as sqrt(scalar(mv*reverse(mv)))
.
LinearAlgebra.norm_sqr
— Methodnorm_sqr(::MultiVector)
Calculates the MultiVector squared norm defined as grade(mv*reverse(mv),0)
CliffordAlgebras.CliffordAlgebra
— TypeCliffordAlgebra(Npos::Integer, Nneg::Integer, Nzero::Integer, S::NTuple(N,Symbol))
Singleton instance of the type CliffordAlgebra that describes a geometric algebra with the signature (Npos,Nneg,Nzero), base symbols S. The base symbols are in order of the signature.
CliffordAlgebras.CliffordAlgebra
— MethodCliffordAlgebra(Npos::Integer, Nneg::Integer, Nzero::Integer)
Generates a geometric algebra with signature (Npos,Nneg,Nzero).
CliffordAlgebras.CliffordAlgebra
— MethodCliffordAlgebra(Npos::Integer, Nneg::Integer)
Generates a geometric algebra with signature (Npos,Nneg,0).
CliffordAlgebras.CliffordAlgebra
— MethodCliffordAlgebra(N::Integer)
Generates a geometric algebra with signature (N,0,0).
CliffordAlgebras.CliffordAlgebra
— MethodCliffordAlgebra(a::Symbol)
Generates a predefined algebra from a identifier. Known algebras are - :Hyperbolic or :Hyper - :Complex or :ℂ - :Dual or :Grassmann - :Grassmann2D or :G2 - :Grassmann3D or :G3 - :Quaternions or :ℍ - :Cl2 and :Cl3 - :Spacetime - :PGA2D or :Projective2D or :Plane2D - :PGA3D or :Projective3D or :Plane3D - :CGA2D or :Conformal2D - :CGA3D or :Conformal3D - :DCGA3D or :DoubleConformal3D - :TCGA3D or :TripleConformal3D - :DCGSTA or :DoubleConformalSpacetime - :QCGA or :QuadricConformal
CliffordAlgebras.MultiVector
— TypeMultiVector{CA,T,BI}
Type for a multivector belonging to the algebra CA<:CliffordAlgbra with vector coefficients of type T. Coefficients are stored using a sparse coding, and only the coefficients of the basis indices stored in the tuple BI are considered.
CliffordAlgebras.MultiVector
— MethodMultiVector(::CliffordAlgebra, v::NTuple{N,T}) where {N,T<:Real}
MultiVector(::Type{<:CliffordAlgebra}, v::NTuple{N,T}) where {N,T<:Real}
Creates a MultiVector by converting the provided vector v to a 1-vector. The internal storage type of the MultiVector is T.
CliffordAlgebras.MultiVector
— MethodMultiVector(::CliffordAlgebra, a::Real)
MultiVector(::Type{<:CliffordAlgebra}, a::Real)
Creates a MultiVector from the real number a with only a scalar component. The internal storage type of the MultiVector is the type of a.