|
250 | 250 | @inline interform(a::A,b::B) where {A<:SubManifold{V},B<:SubManifold{V}} where V = a(b)
|
251 | 251 |
|
252 | 252 | function Base.show(io::IO,s::SubManifold{V,NN,S}) where {V,NN,S}
|
253 |
| - isbasis(s) && (return printindices(io,V,bits(s))) |
| 253 | + isbasis(s) && (return printindices(io,V,UInt(s))) |
254 | 254 | P = typeof(V)<:Int ? V : parent(V)
|
255 | 255 | PnV = typeof(P) ≠ typeof(V)
|
256 | 256 | PnV && print(io,'Λ',sups[rank(V)])
|
@@ -366,8 +366,8 @@ Simplex type with pseudoscalar `V::Manifold`, grade/rank `G::Int`, `B::SubManifo
|
366 | 366 | """
|
367 | 367 | struct Simplex{V,G,B,T} <: TensorTerm{V,G}
|
368 | 368 | v::T
|
369 |
| - Simplex{A,B,C,D}(t::E) where E<:D where {A,B,C,D} = new{submanifold(A),B,C,D}(t) |
370 |
| - Simplex{A,B,C,D}(t::E) where E<:TensorAlgebra{A} where {A,B,C,D} = new{submanifold(A),B,C,D}(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) |
371 | 371 | end
|
372 | 372 |
|
373 | 373 | export Simplex
|
|
392 | 392 | function Simplex{V,G,B}(b::T) where T<:TensorTerm{V} where {V,G,B}
|
393 | 393 | order(B)+order(b)>diffmode(V) ? zero(V) : Simplex{V,G,B,Any}(b)
|
394 | 394 | end
|
395 |
| -function Base.show(io::IO,m::Simplex) |
396 |
| - T = typeof(value(m)) |
397 |
| - par = !(T <: TensorTerm) && |(broadcast(<:,T,parval)...) |
398 |
| - #val = T<:Float64 ? @fprintf() : m.v |
399 |
| - print(io,(par ? ['(',m.v,')'] : [m.v])...,basis(m)) |
400 |
| -end |
| 395 | +Base.show(io::IO,m::Simplex) = Leibniz.showvalue(io,Manifold(m),UInt(basis(m)),value(m)) |
401 | 396 | for VG ∈ ((:V,),(:V,:G))
|
402 | 397 | @eval function Simplex{$(VG...)}(v,b::Simplex{V,G}) where {V,G}
|
403 | 398 | order(v)+order(b)>diffmode(V) ? zero(V) : Simplex{V,G,basis(b)}(AbstractTensors.∏(v,b.v))
|
|
0 commit comments