Skip to content

Commit

Permalink
dispatched valutype(::Type)
Browse files Browse the repository at this point in the history
  • Loading branch information
chakravala committed Sep 12, 2020
1 parent 55848ab commit 8c7978b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DirectSum"
uuid = "22fd7b30-a8c0-5bf2-aabe-97783860d07c"
authors = ["Michael Reed"]
version = "0.7.3"
version = "0.7.4"

[deps]
ComputedFieldTypes = "459fdd68-db75-56b8-8c15-d717a790f88e"
Expand Down
4 changes: 2 additions & 2 deletions src/generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ end

export isdyadic, isdual, istangent

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

for T (:T,:(Type{T}))
@eval begin
@pure valuetype(::$T) where T<:SubManifold = Int
@pure valuetype(::$T) where T<:Simplex{V,G,B,𝕂} where {V,G,B} where 𝕂 = 𝕂
@pure isbasis(::$T) where T<:SubManifold{V} where V = typeof(V)<:SubManifold
@pure isbasis(::$T) where T<:TensorBundle = false
@pure isbasis(::$T) where T<:Simplex = false
Expand Down

2 comments on commit 8c7978b

@chakravala
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/21297

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.4 -m "<description of version>" 8c7978be2b1726dff16b0a0449a723d21790a5ce
git push origin v0.7.4

Please sign in to comment.