Skip to content

Commit

Permalink
equalities with Infinity
Browse files Browse the repository at this point in the history
  • Loading branch information
chakravala committed Sep 17, 2023
1 parent 8a24981 commit d65fa80
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/DirectSum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ end
@pure Infinity(V::Int) = Infinity(submanifold(V))
@pure Infinity(V::Submanifold{M}) where M = Infinity{isbasis(V) ? M : V}()

Real(::Infinity) = Inf
(::Type{T})(m::Infinity) where T<:AbstractFloat = T(Inf)
(::Type{Complex})(m::Infinity) = Complex(Inf)
(::Type{Complex{T}})(m::Infinity) where T = Complex{T}(T(Inf),T(Inf))
Expand All @@ -588,6 +589,14 @@ end
Base.show(io::IO,::Infinity{V}) where V = print(io,"")

==(::Infinity,::Infinity) = true
==(a::T,::Infinity) where T<:TensorAlgebra = isinf(norm(a))
==(::Infinity,b::T) where T<:TensorAlgebra = isinf(norm(b))
for T Fields
@eval begin
==(a::T,::Infinity) where T<:$T = isinf(a)
==(::Infinity,b::T) where T<:$T = isinf(b)
end
end

import Base: reverse, conj
import AbstractTensors: hodge, clifford, complementleft, complementlefthodge
Expand Down

2 comments on commit d65fa80

@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/91578

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.8.7 -m "<description of version>" d65fa802bdef9766d2f4469b2048c5b4d7f5b01d
git push origin v0.8.7

Please sign in to comment.