Skip to content

Commit 492504c

Browse files
committed
deprecated Simplex for Single
1 parent ec64447 commit 492504c

File tree

6 files changed

+83
-83
lines changed

6 files changed

+83
-83
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DirectSum"
22
uuid = "22fd7b30-a8c0-5bf2-aabe-97783860d07c"
33
authors = ["Michael Reed"]
4-
version = "0.8"
4+
version = "0.8.1"
55

66
[deps]
77
ComputedFieldTypes = "459fdd68-db75-56b8-8c15-d717a790f88e"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ The symmetrical algebra does not need to track this parity, but has higher multi
151151
Symmetric differential function algebra of Leibniz trivializes the orientation into a single class of index multi-sets, while Grassmann's exterior algebra is partitioned into two oriented equivalence classes by anti-symmetry.
152152
Full tensor algebra can be sub-partitioned into equivalence classes in multiple ways based on the element symmetry, grade, and metric signature composite properties.
153153

154-
By virtue of Julia's multiple dispatch on the field type `𝕂`, methods can specialize on the dimension `n` and grade `G` with a `TensorBundle{n}` via the `TensorAlgebra{V}` subtypes, such as `Submanifold{V,G}`, `Simplex{V,G,B,𝕂}`.
154+
By virtue of Julia's multiple dispatch on the field type `𝕂`, methods can specialize on the dimension `n` and grade `G` with a `TensorBundle{n}` via the `TensorAlgebra{V}` subtypes, such as `Submanifold{V,G}`, `Single{V,G,B,𝕂}`.
155155

156156
The elements of the `Basis` can be generated in many ways using the `Submanifold` elements created by the `@basis` macro,
157157
```julia
@@ -189,7 +189,7 @@ In order to work with a `TensorAlgebra{V}`, it is necessary for some computation
189189
Staging of precompilation and caching is designed so that a user can smoothly transition between very high dimensional and low dimensional algebras in a single session, with varying levels of extra caching and optimizations.
190190
The parametric type formalism in `DirectSum` is highly expressive and enables pre-allocation of geometric algebra computations involving specific sparse subalgebras, including the representation of rotational groups.
191191

192-
It is possible to reach `Simplex` elements with up to `N=62` vertices from a `TensorAlgebra` having higher maximum dimensions than supported by Julia natively.
192+
It is possible to reach `Single` elements with up to `N=62` vertices from a `TensorAlgebra` having higher maximum dimensions than supported by Julia natively.
193193
The 62 indices require full alpha-numeric labeling with lower-case and capital letters. This now allows you to reach up to `4,611,686,018,427,387,904` dimensions with Julia `using DirectSum`. Then the volume element is
194194
```julia
195195
v₁₂₃₄₅₆₇₈₉₀abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

src/DirectSum.jl

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -360,50 +360,50 @@ for n ∈ 0:9
360360
end
361361

362362
"""
363-
Simplex{V,G,B,𝕂} <: TensorTerm{V,G} <: TensorGraded{V,G}
363+
Single{V,G,B,𝕂} <: TensorTerm{V,G} <: TensorGraded{V,G}
364364
365-
Simplex type with pseudoscalar `V::Manifold`, grade/rank `G::Int`, `B::Submanifold{V,G}`, field `𝕂::Type`.
365+
Single type with pseudoscalar `V::Manifold`, grade/rank `G::Int`, `B::Submanifold{V,G}`, field `𝕂::Type`.
366366
"""
367-
struct Simplex{V,G,B,T} <: TensorTerm{V,G}
367+
struct Single{V,G,B,T} <: TensorTerm{V,G}
368368
v::T
369-
Simplex{A,B,C,D}(t::E) where E<:D where {A,B,C,D} = new{submanifold(A),B,basis(C),D}(t)
370-
Simplex{A,B,C,D}(t::E) where E<:TensorAlgebra{A} where {A,B,C,D} = new{submanifold(A),B,basis(C),D}(t)
369+
Single{A,B,C,D}(t) where {A,B,C,D} = new{submanifold(A),B,basis(C),D}(t)
370+
Single{A,B,C,D}(t::E) where E<:TensorAlgebra{A} where {A,B,C,D} = new{submanifold(A),B,basis(C),D}(t)
371371
end
372372

373-
export Simplex
374-
@pure Simplex(b::Submanifold{V,G}) where {V,G} = Simplex{V}(b)
375-
@pure Simplex{V}(b::Submanifold{V,G}) where {V,G} = Simplex{V,G,b,Int}(1)
376-
Simplex{V}(v::T) where {V,T} = Simplex{V,0,Submanifold{V}(),T}(v)
377-
Simplex{V}(v::S) where S<:TensorTerm where V = v
378-
Simplex{V,G,B}(v::T) where {V,G,B,T} = Simplex{V,G,B,T}(v)
379-
Simplex(v,b::S) where S<:TensorTerm{V} where V = Simplex{V}(v,b)
380-
Simplex{V}(v,b::S) where S<:TensorAlgebra where V = v*b
381-
Simplex{V}(v,b::Submanifold{V,G}) where {V,G} = Simplex{V,G}(v,b)
382-
Simplex{V}(v,b::Submanifold{W,G}) where {V,W,G} = Simplex{V,G}(v,b)
383-
function Simplex{V,G}(v::T,b::Submanifold{V,G}) where {V,G,T}
384-
order(v)+order(b)>diffmode(V) ? Zero(V) : Simplex{V,G,b,T}(v)
373+
export Single
374+
@pure Single(b::Submanifold{V,G}) where {V,G} = Single{V}(b)
375+
@pure Single{V}(b::Submanifold{V,G}) where {V,G} = Single{V,G,b,Int}(1)
376+
Single{V}(v::T) where {V,T} = Single{V,0,Submanifold{V}(),T}(v)
377+
Single{V}(v::S) where S<:TensorTerm where V = v
378+
Single{V,G,B}(v::T) where {V,G,B,T} = Single{V,G,B,T}(v)
379+
Single(v,b::S) where S<:TensorTerm{V} where V = Single{V}(v,b)
380+
Single{V}(v,b::S) where S<:TensorAlgebra where V = v*b
381+
Single{V}(v,b::Submanifold{V,G}) where {V,G} = Single{V,G}(v,b)
382+
Single{V}(v,b::Submanifold{W,G}) where {V,W,G} = Single{V,G}(v,b)
383+
function Single{V,G}(v::T,b::Submanifold{V,G}) where {V,G,T}
384+
order(v)+order(b)>diffmode(V) ? Zero(V) : Single{V,G,b,T}(v)
385385
end
386-
function Simplex{V,G}(v::T,b::Submanifold{W,G}) where {V,W,G,T}
387-
order(v)+order(b)>diffmode(V) ? Zero(V) : Simplex{V,G,V(b),T}(v)
386+
function Single{V,G}(v::T,b::Submanifold{W,G}) where {V,W,G,T}
387+
order(v)+order(b)>diffmode(V) ? Zero(V) : Single{V,G,V(b),T}(v)
388388
end
389-
function Simplex{V,G}(v::T,b::Submanifold{V,G}) where T<:TensorTerm where {G,V}
390-
order(v)+order(b)>diffmode(V) ? Zero(V) : Simplex{V,G,b,Any}(v)
389+
function Single{V,G}(v::T,b::Submanifold{V,G}) where T<:TensorTerm where {G,V}
390+
order(v)+order(b)>diffmode(V) ? Zero(V) : Single{V,G,b,Any}(v)
391391
end
392-
function Simplex{V,G,B}(b::T) where T<:TensorTerm{V} where {V,G,B}
393-
order(B)+order(b)>diffmode(V) ? Zero(V) : Simplex{V,G,B,Any}(b)
392+
function Single{V,G,B}(b::T) where T<:TensorTerm{V} where {V,G,B}
393+
order(B)+order(b)>diffmode(V) ? Zero(V) : Single{V,G,B,Any}(b)
394394
end
395-
Base.show(io::IO,m::Simplex) = Leibniz.showvalue(io,Manifold(m),UInt(basis(m)),value(m))
395+
Base.show(io::IO,m::Single) = Leibniz.showvalue(io,Manifold(m),UInt(basis(m)),value(m))
396396
for VG ((:V,),(:V,:G))
397-
@eval function Simplex{$(VG...)}(v,b::Simplex{V,G}) where {V,G}
398-
order(v)+order(b)>diffmode(V) ? Zero(V) : Simplex{V,G,basis(b)}(AbstractTensors.(v,b.v))
397+
@eval function Single{$(VG...)}(v,b::Single{V,G}) where {V,G}
398+
order(v)+order(b)>diffmode(V) ? Zero(V) : Single{V,G,basis(b)}(AbstractTensors.(v,b.v))
399399
end
400400
end
401401

402402
equal(a::TensorTerm{V,G},b::TensorTerm{V,G}) where {V,G} = basis(a) == basis(b) ? value(a) == value(b) : 0 == value(a) == value(b)
403403

404404
for T (Fields...,Symbol,Expr)
405405
@eval begin
406-
Base.isapprox(a::S,b::T;atol::Real=0,rtol::Real=Base.rtoldefault(a,b,atol),nans::Bool=false,norm::Function=LinearAlgebra.norm) where {S<:TensorAlgebra,T<:$T} = Base.isapprox(a,Simplex{Manifold(a)}(b);atol=atol,rtol=rtol,nans=nans,norm=norm)
406+
Base.isapprox(a::S,b::T;atol::Real=0,rtol::Real=Base.rtoldefault(a,b,atol),nans::Bool=false,norm::Function=LinearAlgebra.norm) where {S<:TensorAlgebra,T<:$T} = Base.isapprox(a,Single{Manifold(a)}(b);atol=atol,rtol=rtol,nans=nans,norm=norm)
407407
Base.isapprox(a::S,b::T;atol::Real=0,rtol::Real=Base.rtoldefault(a,b,atol),nans::Bool=false,norm::Function=LinearAlgebra.norm) where {S<:$T,T<:TensorAlgebra} = Base.isapprox(b,a;atol=atol,rtol=rtol,nans=nans,norm=norm)
408408
end
409409
end
@@ -412,18 +412,19 @@ for Field ∈ Fields
412412
TF = Field Fields ? :Any : :T
413413
EF = Field Any ? Field : ExprField
414414
@eval begin
415-
Base.:*(a::F,b::Submanifold{V}) where {F<:$EF,V} = Simplex{V}(a,b)
416-
Base.:*(a::Submanifold{V},b::F) where {F<:$EF,V} = Simplex{V}(b,a)
417-
Base.:*(a::F,b::Simplex{V,G,B,T} where B) where {F<:$Field,V,G,T<:$Field} = Simplex{V,G}(Base.:*(a,b.v),basis(b))
418-
Base.:*(a::Simplex{V,G,B,T} where B,b::F) where {F<:$Field,V,G,T<:$Field} = Simplex{V,G}(Base.:*(a.v,b),basis(a))
419-
Base.adjoint(b::Simplex{V,G,B,T}) where {V,G,B,T<:$Field} = Simplex{dual(V),G,B',$TF}(Base.conj(value(b)))
415+
Base.:*(a::F,b::Submanifold{V}) where {F<:$EF,V} = Single{V}(a,b)
416+
Base.:*(a::Submanifold{V},b::F) where {F<:$EF,V} = Single{V}(b,a)
417+
Base.:*(a::F,b::Single{V,G,B,T} where B) where {F<:$Field,V,G,T<:$Field} = Single{V,G}(Base.:*(a,b.v),basis(b))
418+
Base.:*(a::Single{V,G,B,T} where B,b::F) where {F<:$Field,V,G,T<:$Field} = Single{V,G}(Base.:*(a.v,b),basis(a))
419+
Base.adjoint(b::Single{V,G,B,T}) where {V,G,B,T<:$Field} = Single{dual(V),G,B',$TF}(Base.conj(value(b)))
420420
end
421421
end
422422

423423
for M (:Signature,:DiagonalForm,:Submanifold)
424424
@eval begin
425-
@inline (V::$M)(s::LinearAlgebra.UniformScaling{T}) where T = Simplex{V}(T<:Bool ? (s.λ ? 1 : -1) : s.λ,getbasis(V,(one(T)<<(mdims(V)-diffvars(V)))-1))
426-
(W::$M)(b::Simplex) = Simplex{W}(value(b),W(basis(b)))
425+
@inline (V::$M)(s::LinearAlgebra.UniformScaling{T}) where T = Single{V}(T<:Bool ? (s.λ ? 1 : -1) : s.λ,getbasis(V,(one(T)<<(mdims(V)-diffvars(V)))-1))
426+
(W::$M)(b::Single) = Single{W}(value(b),W(basis(b)))
427+
==(::Type{<:$M}, ::Type{Union{}}) = false
427428
end
428429
end
429430

@@ -485,13 +486,12 @@ for T ∈ Fields
485486
end
486487
end
487488

488-
import AbstractTensors: clifford, complementleft, complementlefthodge
489-
for op (:hodge,:clifford,:complementleft,:complementlefthodge,:involute)
489+
import Base: reverse, conj
490+
import AbstractTensors: hodge, clifford, complementleft, complementlefthodge
491+
for op (:hodge,:clifford,:complementleft,:complementlefthodge,:involute,:conj,:reverse)
490492
@eval $op(t::Zero) = t
491493
end
492494

493-
@inline Base.exp(::Zero{V}) where V = One(V)
494-
495495
@inline Base.abs2(t::Zero) = t
496496

497497
const g_zero,g_one = Zero,One

src/basis.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ macro mixedbasis_str(str)
120120
Expr(:block,bases,alloc(V',vsn[2]),alloc(V),bases.args[end])
121121
end
122122

123-
@inline function lookup_basis(V,v::Symbol)::Union{Simplex,Submanifold}
123+
@inline function lookup_basis(V,v::Symbol)::Union{Single,Submanifold}
124124
p,b,w,z = indexparity(V,v)
125125
z && return g_zero(V)
126126
d = Submanifold{w}(indexbits(mdims(w),b))
127-
return p ? Simplex(-1,d) : d
127+
return p ? Single(-1,d) : d
128128
end
129129

130130
## fundamentals
@@ -281,10 +281,10 @@ Base.one(V::T) where T<:TensorBundle = One(V)
281281
Base.zero(V::T) where T<:TensorBundle = Zero(V)
282282
Base.zero(V::Submanifold) = Zero(V)
283283
Base.one(V::Submanifold{M}) where M = Submanifold{isbasis(V) ? M : V}()
284-
Base.zero(::Simplex{V}) where V = Simplex{V}(0)
285-
Base.one(::Simplex{V}) where V = Simplex{V}(1)
286-
Base.zero(::Type{Simplex{V}}) where V = Simplex{V}(0)
287-
Base.one(::Type{Simplex{V}}) where V = Simplex{V}(1)
284+
Base.zero(::Single{V}) where V = Single{V}(0)
285+
Base.one(::Single{V}) where V = Single{V}(1)
286+
Base.zero(::Type{Single{V}}) where V = Single{V}(0)
287+
Base.one(::Type{Single{V}}) where V = Single{V}(1)
288288

289289
## SparseAlgebra{V}
290290

src/generic.jl

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export valuetype, value, hasinf, hasorigin, isorigin, norm, indices, tangent, is
2323
#@pure Base.ndims(S::Submanifold{M,G}) where {G,M} = isbasis(S) ? mdims(M) : G
2424
@pure AbstractTensors.mdims(S::Submanifold{M,G}) where {G,M} = isbasis(S) ? mdims(M) : G
2525
@pure order(m::Submanifold{V,G,B} where G) where {V,B} = order(V)>0 ? count_ones(symmetricmask(V,B,B)[4]) : 0
26-
@pure order(m::Simplex) = order(basis(m))+order(value(m))
26+
@pure order(m::Single) = order(basis(m))+order(value(m))
2727
@pure options(::T) where T<:TensorBundle{N,M} where N where M = M
2828
@pure options_list(V::M) where M<:Manifold = hasinf(V),hasorigin(V),dyadmode(V),polymode(V)
2929
@pure metric(::T) where T<:TensorBundle{N,M,S} where {N,M} where S = S
@@ -44,21 +44,21 @@ export isdyadic, isdual, istangent
4444

4545
@inline value(x::M,T=Int) where M<:TensorBundle = T==Any ? 1 : one(T)
4646
@inline value(::Submanifold,T=Int) = T==Any ? 1 : one(T)
47-
@inline value(m::Simplex,T::DataType=valuetype(m)) = T(valuetype(m),Any) ? convert(T,m.v) : m.v
47+
@inline value(m::Single,T::DataType=valuetype(m)) = T(valuetype(m),Any) ? convert(T,m.v) : m.v
4848

4949
@pure basis(m::Zero{V}) where V = getbasis(V,UInt(0))
5050
@pure basis(m::T) where T<:Submanifold = isbasis(m) ? m : Submanifold(m)
5151
@pure basis(m::Type{T}) where T<:Submanifold = isbasis(m) ? m() : typeof(Submanifold(m()))
5252
for T (:T,:(Type{T}))
5353
@eval begin
5454
@pure valuetype(::$T) where T<:Submanifold = Int
55-
@pure valuetype(::$T) where T<:Simplex{V,G,B,𝕂} where {V,G,B} where 𝕂 = 𝕂
55+
@pure valuetype(::$T) where T<:Single{V,G,B,𝕂} where {V,G,B} where 𝕂 = 𝕂
5656
@pure isbasis(::$T) where T<:Submanifold{V} where V = issubmanifold(V)
5757
@pure isbasis(::$T) where T<:TensorBundle = false
58-
@pure isbasis(::$T) where T<:Simplex = false
59-
@pure basis(m::$T) where T<:Simplex{V,G,B} where {V,G} where B = B
58+
@pure isbasis(::$T) where T<:Single = false
59+
@pure basis(m::$T) where T<:Single{V,G,B} where {V,G} where B = B
6060
@pure UInt(b::$T) where T<:Submanifold{V,G,B} where {V,G} where B = B::UInt
61-
@pure UInt(b::$T) where T<:Simplex = UInt(basis(b))
61+
@pure UInt(b::$T) where T<:Single = UInt(basis(b))
6262
end
6363
end
6464
@pure det(s::Signature) = isodd(count_ones(metric(s))) ? -1 : 1
@@ -79,7 +79,7 @@ for (part,G) ∈ ((:scalar,0),(:vector,1),(:bivector,2))
7979
end
8080
end
8181
for T (Expr,Symbol)
82-
@eval @inline Base.iszero(t::Simplex{V,G,B,$T} where {V,G,B}) = false
82+
@eval @inline Base.iszero(t::Single{V,G,B,$T} where {V,G,B}) = false
8383
end
8484

8585
@pure val(G::Int) = Val{G}()
@@ -89,10 +89,10 @@ grade(t::TensorGraded{V,L},g::Val{G}) where {V,G,L} = Zero(V)
8989

9090
@pure hasinf(::T) where T<:TensorBundle{N,M} where N where M = _hasinf(M)
9191
@pure hasinf(::Submanifold{M,N,S} where N) where {M,S} = hasinf(M) && isodd(S)
92-
@pure hasinf(t::Simplex) = hasinf(basis(t))
92+
@pure hasinf(t::Single) = hasinf(basis(t))
9393
@pure hasorigin(::T) where T<:TensorBundle{N,M} where N where M = _hasorigin(M)
9494
@pure hasorigin(V::Submanifold{M,N,S} where N) where {M,S} = hasorigin(M) && (hasinf(M) ? (d=UInt(2);(d&S)==d) : isodd(S))
95-
@pure hasorigin(t::Simplex) = hasorigin(basis(t))
95+
@pure hasorigin(t::Single) = hasorigin(basis(t))
9696
@pure Base.isinf(e::Submanifold{V}) where V = hasinf(e) && count_ones(UInt(e)) == 1
9797
@pure isorigin(e::Submanifold{V}) where V = hasorigin(V) && count_ones(UInt(e))==1 && e[hasinf(V)+1]
9898

@@ -177,26 +177,26 @@ for r ∈ (:reverse,:involute,:(Base.conj),:clifford)
177177
p = Symbol(:parity,r==:(Base.conj) ? :conj : r)
178178
@eval begin
179179
@pure function $r(b::Submanifold{V,G,B}) where {V,G,B}
180-
$p(grade(V,B)) ? Simplex{V}(-value(b),b) : b
180+
$p(grade(V,B)) ? Single{V}(-value(b),b) : b
181181
end
182-
$r(b::Simplex) = value(b) 0 ? Simplex(value(b),$r(basis(b))) : Zero(Manifold(b))
182+
$r(b::Single) = value(b) 0 ? Single(value(b),$r(basis(b))) : Zero(Manifold(b))
183183
end
184184
end
185185

186186
for op (:div,:rem,:mod,:mod1,:fld,:fld1,:cld,:ldexp)
187187
@eval begin
188188
Base.$op(a::Submanifold{V,G},m) where {V,G} = Submanifold{V,G}($op(value(a),m))
189-
Base.$op(b::Simplex{V,G,B,T},m) where {V,G,B,T} = Simplex{V,G,B}($op(value(b),m))
189+
Base.$op(b::Single{V,G,B,T},m) where {V,G,B,T} = Single{V,G,B}($op(value(b),m))
190190
end
191191
end
192192
for op (:mod2pi,:rem2pi,:rad2deg,:deg2rad,:round)
193193
@eval begin
194194
Base.$op(a::Submanifold{V,G}) where {V,G} = Submanifold{V,G}($op(value(a)))
195-
Base.$op(b::Simplex{V,G,B,T}) where {V,G,B,T} = Simplex{V,G,B}($op(value(b)))
195+
Base.$op(b::Single{V,G,B,T}) where {V,G,B,T} = Single{V,G,B}($op(value(b)))
196196
end
197197
end
198198
Base.rationalize(t::Type,a::Submanifold{V,G},tol::Real=eps(T)) where {V,G} = Submanifold{V,G}(rationalize(t,value(a),tol))
199-
Base.rationalize(t::Type,b::Simplex{V,G,B,T};tol::Real=eps(T)) where {V,G,B,T} = Simplex{V,G,B}(rationalize(t,value(b),tol))
199+
Base.rationalize(t::Type,b::Single{V,G,B,T};tol::Real=eps(T)) where {V,G,B,T} = Single{V,G,B}(rationalize(t,value(b),tol))
200200

201201
# random samplers
202202

@@ -206,10 +206,10 @@ Base.rand(::AbstractRNG,::SamplerType{Manifold}) where V = Submanifold(Manifold(
206206
Base.rand(::AbstractRNG,::SamplerType{Submanifold}) = rand(Submanifold{rand(Manifold)})
207207
Base.rand(::AbstractRNG,::SamplerType{Submanifold{V}}) where V = Submanifold{V}(UInt(rand(0:1<<mdims(V)-1)))
208208
Base.rand(::AbstractRNG,::SamplerType{Submanifold{V,G}}) where {V,G} = Λ(V).b[rand(binomsum(ndims(V),G)+1:binomsum(mdims(V),G+1))]
209-
Base.rand(::AbstractRNG,::SamplerType{Simplex}) = rand(Simplex{rand(Manifold)})
210-
Base.rand(::AbstractRNG,::SamplerType{Simplex{V}}) where V = orand()*rand(Submanifold{V})
211-
Base.rand(::AbstractRNG,::SamplerType{Simplex{V,G}}) where {V,G} = orand()*rand(Submanifold{V,G})
212-
Base.rand(::AbstractRNG,::SamplerType{Simplex{V,G,B}}) where {V,G,B} = orand()*B
213-
Base.rand(::AbstractRNG,::SamplerType{Simplex{V,G,B,T}}) where {V,G,B,T} = rand(T)*B
214-
Base.rand(::AbstractRNG,::SamplerType{Simplex{V,G,B,T} where B}) where {V,G,T} = rand(T)*rand(Submanifold{V,G})
215-
Base.rand(::AbstractRNG,::SamplerType{Simplex{V,G,B,T} where {G,B}}) where {V,T} = rand(T)*rand(Submanifold{V})
209+
Base.rand(::AbstractRNG,::SamplerType{Single}) = rand(Single{rand(Manifold)})
210+
Base.rand(::AbstractRNG,::SamplerType{Single{V}}) where V = orand()*rand(Submanifold{V})
211+
Base.rand(::AbstractRNG,::SamplerType{Single{V,G}}) where {V,G} = orand()*rand(Submanifold{V,G})
212+
Base.rand(::AbstractRNG,::SamplerType{Single{V,G,B}}) where {V,G,B} = orand()*B
213+
Base.rand(::AbstractRNG,::SamplerType{Single{V,G,B,T}}) where {V,G,B,T} = rand(T)*B
214+
Base.rand(::AbstractRNG,::SamplerType{Single{V,G,B,T} where B}) where {V,G,T} = rand(T)*rand(Submanifold{V,G})
215+
Base.rand(::AbstractRNG,::SamplerType{Single{V,G,B,T} where {G,B}}) where {V,T} = rand(T)*rand(Submanifold{V})

0 commit comments

Comments
 (0)