Skip to content

Commit

Permalink
use SymmetrySectors U1 in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ogauthe committed Nov 5, 2024
1 parent e51fba3 commit 2f086ec
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ using NDTensors.GradedAxes:
isdual
using NDTensors.LabelledNumbers: label
using NDTensors.SparseArrayInterface: nstored
using NDTensors.SymmetrySectors: U1
using NDTensors.TensorAlgebra: fusedims, splitdims
using LinearAlgebra: adjoint
using Random: randn!
Expand All @@ -26,13 +27,6 @@ function blockdiagonal!(f, a::AbstractArray)
return a
end

struct U1
n::Int
end
GradedAxes.dual(c::U1) = U1(-c.n)
GradedAxes.fuse_labels(c1::U1, c2::U1) = U1(c1.n + c2.n)
Base.isless(c1::U1, c2::U1) = isless(c1.n, c2.n)

const elts = (Float32, Float64, Complex{Float32}, Complex{Float64})
@testset "BlockSparseArraysGradedAxesExt (eltype=$elt)" for elt in elts
@testset "map" begin
Expand Down

0 comments on commit 2f086ec

Please sign in to comment.