Main.Mingal.AlgebraStructType
AlgebraStruct(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 definition
  • q::Int : The second parameter of the definition
  • VectorBasis::Array{String} : An Array with vectors to work with
  • Basis::Array{Tuple{String,Int}} : An Array with the multivector base and it's indexes
  • Indexes::Array{Array{Int}} : An array with all the indexes of canonical blades
source
Main.Mingal.BladeType
Blade(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.
source
Main.Mingal.MultivectorType
Multivector(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.
source
Main.Mingal.AlgebraFunction
Algebra(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 definition
  • q::Int : The second parameter of the definition
  • VectorBasis::Array{String} : An Array with vectors to work with
  • Basis::Array{Tuple{String,Int}} : An Array with the multivector base and it's indexes

Return

Returns the created Algebra object.

source
Main.Mingal.CanonBasisMethod
CanonBasis(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.

source
Main.Mingal.CanonVectorBasisFunction
CanonVectorBasis(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 definition
  • q::Int : The second parameter of the definition

Return

Return an array of strings with all the necessary elements for this space.

source
Main.Mingal.CombinationsArrayMethod
CombinationsArray(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.

source
Main.Mingal.CombinationsTupleMethod
CombinationsTuple(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.

source
Main.Mingal.CreateAlgebraFunction
CreateAlgebra(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 definition
  • q::Int : The second parameter of the definition
  • VectorBasis::Array{String} : An Array with vectors to work with
  • Basis::Array{Tuple{String,Int}} : An Array with the multivector base and it's indexes

Return

Returns the created Algebra object.

source
Main.Mingal.CreateGPTableFunction
CreateGPTable(Al::Algebra)

Function that creates the Operation Table for the Geometric Product.

Arguments

  • Al::AlgebraStruct : The Algebra, it is setted as CurrentAlgebra.
source
Main.Mingal.CreateIPTableFunction
CreateIPTable(Al::AlgebraStruct)

Function that creates the Operation Table for the Inner Product.

Arguments

  • Al::AlgebraStruct : The Algebra, it is setted as CurrentAlgebra.
source
Main.Mingal.CreateOPTableFunction
CreateOPTable(Al::AlgebraStruct)

Function that creates the Operation Table for the Outer Product.

Arguments

  • Al::AlgebraStruct : The Algebra, it is setted as CurrentAlgebra.
source
Main.Mingal.CreateSymbolsMethod
CreateSymbols(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.
source
Main.Mingal.IndexesBasisFunction
IndexesBasis(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 definition
  • q::Int : The second parameter of the definition

Return

Returns an Array of Arrays of integers, with all indexes in order.

source
Main.Mingal.MultivectorsFunction
Multivectors(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.

source
Main.Mingal.bladeGeometricProductFunction
bladeGeometricProduct(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.

source
Main.Mingal.bladeInnerProductMethod
bladeInnerProduct(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.

source
Main.Mingal.bladeOuterProductMethod
bladeOuterProduct(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.

source
Main.Mingal.bladeScalarProductMethod
bladeScalarProduct(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.

source
Main.Mingal.bladeindexFunction
bladeindex(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.

source
Main.Mingal.bladescalarMethod
bladescalar(vec)::Any

Function that returns scalar of a Blade.

Arguments

  • vec::Blade : A Blade.

Return

A real number, the scalar.

source
Main.Mingal.getScaleMethod
getScale(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.

source
Main.Mingal.getScaleMethod
getScale(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.

source
Main.Mingal.gradeMethod
grade(vec)::Int

Function that returns the grade of the Blade.

Arguments

  • vec::Blade : A Blade.

Return

An integer, the grade of the blade.

source
Main.Mingal.gradeprojectionMethod
gradeprojection(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"

source
Main.Mingal.lenElementsMethod
lenElements(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.

source
Main.Mingal.multivectorByScalarMethod
multivectorByScalar(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.

source
Main.Mingal.multivectorGPMethod
multivectorGP(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.

source
Main.Mingal.multivectorIPMethod
multivectorIP(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.

source
Main.Mingal.multivectorOPMethod
multivectorOP(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.

source
Main.Mingal.multivectorSubMethod
multivectorSub(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.

source
Main.Mingal.multivectorSumMethod
multivectorSum(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.

source
Main.Mingal.rawBladeGeometricProductFunction
rawBladeGeometricProduct(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.

source
Main.Mingal.rawBladeInnerProductFunction
rawBladeInnerProduct(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.

source
Main.Mingal.rawBladeOuterProductFunction
rawBladeOuterProduct(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.

source
Main.Mingal.scalarproductFunction
scalarproduct(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.

source