Skip to content

Commit

Permalink
remove gradedisequal(OneToOne)
Browse files Browse the repository at this point in the history
  • Loading branch information
ogauthe committed Sep 26, 2024
1 parent e8624e3 commit 9d54770
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions NDTensors/src/lib/GradedAxes/src/fusion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ OneToOne() = OneToOne{Bool}()
Base.first(a::OneToOne) = one(eltype(a))
Base.last(a::OneToOne) = one(eltype(a))

gradedisequal(::OneToOne, ::OneToOne) = true

# https://github.com/ITensor/ITensors.jl/blob/v0.3.57/NDTensors/src/lib/GradedAxes/src/tensor_product.jl
# https://en.wikipedia.org/wiki/Tensor_product
# https://github.com/KeitaNakamura/Tensorial.jl
Expand Down
4 changes: 4 additions & 0 deletions NDTensors/src/lib/GradedAxes/src/gradedunitrange.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ end

# == is just a range comparison that ignores labels. Need dedicated function to check equality.
function gradedisequal(a1::AbstractUnitRange, a2::AbstractUnitRange)
return blockisequal(a1, a2)
end

function gradedisequal(a1::AbstractGradedUnitRange, a2::AbstractGradedUnitRange)
return blockisequal(a1, a2) && (blocklabels(a1) == blocklabels(a2))
end

Expand Down

0 comments on commit 9d54770

Please sign in to comment.