Skip to content

Commit 8c7978b

Browse files
committed
dispatched valutype(::Type)
1 parent 55848ab commit 8c7978b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
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.7.3"
4+
version = "0.7.4"
55

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

src/generic.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ end
4242

4343
export isdyadic, isdual, istangent
4444

45-
@pure valuetype(::SubManifold) = Int
46-
@pure valuetype(::Simplex{V,G,B,T} where {V,G,B}) where T = T
4745
@inline value(x::M,T=Int) where M<:TensorBundle = T==Any ? 1 : one(T)
4846
@inline value(::SubManifold,T=Int) = T==Any ? 1 : one(T)
4947
@inline value(m::Simplex,T::DataType=valuetype(m)) = T(valuetype(m),Any) ? convert(T,m.v) : m.v
5048

5149
for T (:T,:(Type{T}))
5250
@eval begin
51+
@pure valuetype(::$T) where T<:SubManifold = Int
52+
@pure valuetype(::$T) where T<:Simplex{V,G,B,𝕂} where {V,G,B} where 𝕂 = 𝕂
5353
@pure isbasis(::$T) where T<:SubManifold{V} where V = typeof(V)<:SubManifold
5454
@pure isbasis(::$T) where T<:TensorBundle = false
5555
@pure isbasis(::$T) where T<:Simplex = false

0 commit comments

Comments
 (0)