Main.Mingal.AlgebraStruct
— TypeAlgebraStruct(p, q, VectorBasis, Basis, Indexes)
A structure to define an algebra to be worked with its respective dimensions and canonical vectors.
Arguments
p::Int
: The first parameter of the definitionq::Int
: The second parameter of the definitionVectorBasis::Array{String}
: An Array with vectors to work withBasis::Array{Tuple{String,Int}}
: An Array with the multivector base and it's indexesIndexes::Array{Array{Int}}
: An array with all the indexes of canonical blades
Main.Mingal.Blade
— TypeBlade(val)
Struct that creates the Blade object.
Arguments
val::SparseArrays.SparseVector{Float64, Int64}
: An sparse vector with the internal values of basis blades and their scalars.
Main.Mingal.Multivector
— TypeMultivector(val)
Struct that creates the multivector object.
Arguments
val::SparseArrays.SparseVector{Float64, Int64}
: An sparse vector with the internal values of basis blades and their scalars.
Main.Mingal.Algebra
— FunctionAlgebra(p, q, VectorBasis, Basis)::AlgebraStruct
Main function for creating your Algebra and adding its basis blades to REPL. Constructor Function of an algebraic object with parameters p, q, R^{p, q}, and its multivector space. If not defined, the last two parameters are automatically calculated as canonical.
Arguments
p::Int
: The first parameter of the definitionq::Int
: The second parameter of the definitionVectorBasis::Array{String}
: An Array with vectors to work withBasis::Array{Tuple{String,Int}}
: An Array with the multivector base and it's indexes
Return
Returns the created Algebra object.
Main.Mingal.CanonBasis
— MethodCanonBasis(VectorBasis)::Array{Tuple{String, Int}}
Function that lists all the combinations of canonical vectors in a given Algebra.
Arguments
VectorBasis::Array{String}
: An array of strings to be combined.
Return
Returns a list of tuples with all combinations of the elements and its index, forming the basis of the multivector space.
Main.Mingal.CanonVectorBasis
— FunctionCanonVectorBasis(p, q)::Array{String}
Function that writes the canonical vector space, given the parameters p and q for definition
Arguments
p::Int
: The first parameter of the definitionq::Int
: The second parameter of the definition
Return
Return an array of strings with all the necessary elements for this space.
Main.Mingal.CombinationsArray
— MethodCombinationsArray(lst, k)::Array{Array{Any}}
Function that calculates all combinations in an array of Integers.
Arguments
lst::Array
: A list of Integers.k::Int
: The order of the combinations.
Return
Returns an array with all combinations of elements taken k at a time.
Main.Mingal.CombinationsTuple
— MethodCombinationsTuple(lst, k, count)::Array{Tuple{Any,Int}}
Function that calculates all combinations in an array of strings.
Arguments
lst::Array
: A list of Strings.k::Int
: The order of the combinations.count::Int : The index of each element
Return
Returns an array with all combinations of elements taken k at a time.
Main.Mingal.CreateAlgebra
— FunctionCreateAlgebra(p, q, VectorBasis, Basis)
Constructor Function of an algebraic object with parameters p, q, R^{p, q}, and its multivector space. If not defined, the last two parameters are automatically calculated as canonical.
Arguments
p::Int
: The first parameter of the definitionq::Int
: The second parameter of the definitionVectorBasis::Array{String}
: An Array with vectors to work withBasis::Array{Tuple{String,Int}}
: An Array with the multivector base and it's indexes
Return
Returns the created Algebra object.
Main.Mingal.CreateGPTable
— FunctionCreateGPTable(Al::Algebra)
Function that creates the Operation Table for the Geometric Product.
Arguments
Al::AlgebraStruct
: The Algebra, it is setted as CurrentAlgebra.
Main.Mingal.CreateIPTable
— FunctionCreateIPTable(Al::AlgebraStruct)
Function that creates the Operation Table for the Inner Product.
Arguments
Al::AlgebraStruct
: The Algebra, it is setted as CurrentAlgebra.
Main.Mingal.CreateOPTable
— FunctionCreateOPTable(Al::AlgebraStruct)
Function that creates the Operation Table for the Outer Product.
Arguments
Al::AlgebraStruct
: The Algebra, it is setted as CurrentAlgebra.
Main.Mingal.CreateSymbols
— MethodCreateSymbols(stringSymbols)
Create and add to REPL all the (custom or basis) symbols for this Algebra.
Arguments
stringSymbols::Array
: An array with all the custom or basis symbols.
Main.Mingal.CreateTables
— MethodCreateTables()
Create and add to REPL all the custom operation tables for this Algebra.
Main.Mingal.IndexesBasis
— FunctionIndexesBasis(p, q)::Array
A function to return all the indexes of every canon multivector. It is used for internal calculations.
Arguments
p::Int
: The first parameter of the definitionq::Int
: The second parameter of the definition
Return
Returns an Array of Arrays of integers, with all indexes in order.
Main.Mingal.Multivectors
— FunctionMultivectors(baseVectors, scalars, Al)::AbstractGeometricAlgebraType
Constructor function for creating either blades or multivectors, done automatically.
Arguments
baseVectors::Array
: An array of integers, representing the actual basis blade that exists in this object in order.scalars::Array
: An array of integers, representing the scalars of each basis blade in order.Al::AlgebraStruct
: The Algebra, it is setted as CurrentAlgebra.
Return
Returns an AbstractGeometricAlgebraType.
Main.Mingal.bladeGeometricProduct
— FunctionbladeGeometricProduct(ei, ej, Al)::Blade
Function that returns the Geometric Product between two blades with the Operation Table.
Arguments
ei::Blade
: A Blade.ej::Blade
: A Blade.Al::AlgebraStruct
: The Algebra, it is setted as CurrentAlgebra.
Return
The result Blade.
Main.Mingal.bladeInnerProduct
— MethodbladeInnerProduct(ei, ej)::Blade
Function that returns the Inner Product between two blades with the Operation Table.
Arguments
ei::Blade
: A Blade.ej::Blade
: A Blade.
Return
The result Blade.
Main.Mingal.bladeOuterProduct
— MethodbladeOuterProduct(ei, ej)::Blade
Function that returns the Outer Product between two blades with the Operation Table.
Arguments
ei::Blade
: A Blade.ej::Blade
: A Blade.
Return
The result Blade.
Main.Mingal.bladeScalarProduct
— MethodbladeScalarProduct(ei, k)::Blade
Function that returns the Scalar Product between a blades and a 1D Number.
Arguments
ei::Blade
: A Blade.k::Number
: A scalar.
Return
The result Blade.
Main.Mingal.bladeindex
— Functionbladeindex(vec, Al)::Array
Function that returns the indexes of a blade.
Arguments
vec::Blade
: A Blade.Al::AlgebraStruct
: The Algebra, it is setted as CurrentAlgebra.
Return
Returns an array with all indexes of that blade.
Main.Mingal.bladescalar
— Methodbladescalar(vec)::Any
Function that returns scalar of a Blade.
Arguments
vec::Blade
: A Blade.
Return
A real number, the scalar.
Main.Mingal.getScale
— MethodgetScale(ei, k)::Number
Function that returns the Scale value in index k from multivector ei. The index k follows the ordered set of basis, the same shown in AlgebraStruct.Basis
Arguments
ei::Multivector
: A Multivector.k::Number
: A scalar.
Return
The Scale value.
Main.Mingal.getScale
— MethodgetScale(ei, symbol)::Number
Function that returns the Scale value in index k from multivector ei. The symbol value represents the blade that you want the scale from
Arguments
ei::Multivector
: A Multivector.symbol::String
: A String.
Return
The Scale value.
Main.Mingal.grade
— Methodgrade(vec)::Int
Function that returns the grade of the Blade.
Arguments
vec::Blade
: A Blade.
Return
An integer, the grade of the blade.
Main.Mingal.gradeprojection
— Methodgradeprojection(vec, k)::Blade
Function that returns the grade Projection between a Blade and an Integer.
Arguments
vec::Blade
: A Blade.k::Int
: An integer to the Grade Projection
Return
The result Blade. It might be the 1D blade "1"
Main.Mingal.lenElements
— MethodlenElements(vec)::Int
Function that returns the length of elements in an Abstract Geometric Algebra Type.
Arguments
vec::AbstractGeometricAlgebraType
: A multivector or a Blade.
Return
An integer, the ammount of elements.
Main.Mingal.multivectorByScalar
— MethodmultivectorByScalar(ei:: AbstractGeometricAlgebraType, k::Number)::AbstractGeometricAlgebraType
Function that computes the product by scalar of a multivectors and a scalar number and return its result.
Arguments
ei::AbstractGeometricAlgebraType
: A multivector.k::Number
: A number.
Return
The result Multivector.
Main.Mingal.multivectorGP
— MethodmultivectorGP(ei::AbstractGeometricAlgebraType, ej::AbstractGeometricAlgebraType)::AbstractGeometricAlgebraType
Function that computes the geometric product of two multivectors and return its result.
Arguments
ei::AbstractGeometricAlgebraType
: A multivector.ej::AbstractGeometricAlgebraType
: A multivector.
Return
The result Multivector.
Main.Mingal.multivectorIP
— MethodmultivectorIP(ei::AbstractGeometricAlgebraType, ej::AbstractGeometricAlgebraType)::AbstractGeometricAlgebraType
Function that computes the inner product of two multivectors and return its result.
Arguments
ei::AbstractGeometricAlgebraType
: A multivector.ej::AbstractGeometricAlgebraType
: A multivector.
Return
The result Multivector.
Main.Mingal.multivectorOP
— MethodmultivectorOP(ei::AbstractGeometricAlgebraType, ej::AbstractGeometricAlgebraType)::AbstractGeometricAlgebraType
Function that computes the outer product of two multivectors and return its result.
Arguments
ei::AbstractGeometricAlgebraType
: A multivector.ej::AbstractGeometricAlgebraType
: A multivector.
Return
The result Multivector.
Main.Mingal.multivectorSub
— MethodmultivectorSub(ei::AbstractGeometricAlgebraType, ej::AbstractGeometricAlgebraType)::AbstractGeometricAlgebraType
Function that subtracts two multivectors and return its result.
Arguments
ei::AbstractGeometricAlgebraType
: A multivector.ej::AbstractGeometricAlgebraType
: A multivector.
Return
The result Multivector.
Main.Mingal.multivectorSum
— MethodmultivectorSum(ei::AbstractGeometricAlgebraType, ej::AbstractGeometricAlgebraType)::AbstractGeometricAlgebraType
Function that sums two multivectors and return its result.
Arguments
ei::AbstractGeometricAlgebraType
: A multivector.ej::AbstractGeometricAlgebraType
: A multivector.
Return
The result Multivector.
Main.Mingal.rawBladeGeometricProduct
— FunctionrawBladeGeometricProduct(ei, ej, Al)::Blade
Function that returns the Geometric Product between two blades. It is used for the Operation Table, it is high cost for single operations over time.
Arguments
ei::Blade
: A Blade.ej::Blade
: A Blade.Al::AlgebraStruct
: The Algebra, it is setted as CurrentAlgebra.
Return
The result Blade.
Main.Mingal.rawBladeInnerProduct
— FunctionrawBladeInnerProduct(ei, ej)::Blade
Function that returns the Inner Product between two blades. It is used for the Operation Table, it is high cost for single operations over time.
Arguments
ei::Blade
: A Blade.ej::Blade
: A Blade.
Return
The result Blade.
Main.Mingal.rawBladeOuterProduct
— FunctionrawBladeOuterProduct(ei, ej)::Blade
Function that returns the Outer Product between two blades. It is used for the Operation Table, it is high cost for single operations over time.
Arguments
ei::Blade
: A Blade.ej::Blade
: A Blade.
Return
The result Blade.
Main.Mingal.scalarproduct
— Functionscalarproduct(ei, ej, Al)::Int
Function that returns the Scalar Product between two basis blades.
Arguments
ei::Blade
: A Blade.ej::Blade
: A Blade.Al::AlgebraStruct
: The Algebra, it is setted as CurrentAlgebra.
Return
The result Integer.