There's great utility in picking random elements of a Clifford algebra, but I want to make sure the library is very clear about how random elements are picked. Julia itself does not have firm rules about how functions like rand or randn should be implemented.
These behaviors are going to be standardized in the package:
rand, randn, and randexp for KVector{0,Q,T} arguments will simply pass in the scalar type T.
randn(::Type{KVector{1,Q,T<:AbstractFloat}}) for positive-definite algebras defined by Q will generate a random 1-blade with each coefficient derived from a Gaussian distribution (just as randn(::Type{T<:AbstractFloat}) would). The norms of these vectors will obey a chi distribution, and their moduli will obey a chi-squared distribution.
rand(::Type{KVector{1,Q,T<:AbstractFloat}}) will normalize the result of randn so that the points lie on the unit sphere centered at the origin.
The big outstanding issues are
- Selecting random k-blades, k-versors, or k-vectors: I assume this can be done by taking random wedge or geometric products of 1-blades, but a) I'm not certain the distribution will be correct, and b) there may be a more efficient way.
- Syntax: I don't think the syntax
rand(KVector{K,Q,T}) is suitable for generating a random k-blade as opposed to a random k-vector. on the other hand, random k-blades are likely to be more useful to a user of this package.
- Non-positive-definite metrics: I really don't know what an appropriate mechanism is for handling arbitrary non-positive-definite metrics. I suspect we can look to the Lorentzian case to handle nondegenerate metrics generally, but even that, to me, is unclear.
There's great utility in picking random elements of a Clifford algebra, but I want to make sure the library is very clear about how random elements are picked. Julia itself does not have firm rules about how functions like
randorrandnshould be implemented.These behaviors are going to be standardized in the package:
rand,randn, andrandexpforKVector{0,Q,T}arguments will simply pass in the scalar typeT.randn(::Type{KVector{1,Q,T<:AbstractFloat}})for positive-definite algebras defined byQwill generate a random 1-blade with each coefficient derived from a Gaussian distribution (just asrandn(::Type{T<:AbstractFloat})would). The norms of these vectors will obey a chi distribution, and their moduli will obey a chi-squared distribution.rand(::Type{KVector{1,Q,T<:AbstractFloat}})will normalize the result ofrandnso that the points lie on the unit sphere centered at the origin.The big outstanding issues are
rand(KVector{K,Q,T})is suitable for generating a random k-blade as opposed to a random k-vector. on the other hand, random k-blades are likely to be more useful to a user of this package.