Skip to content

Commit ad628dc

Browse files
committed
abstractvector dispatch
1 parent 15df330 commit ad628dc

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/setup.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const MTK = MultiTensorKit
1010

1111
Random.seed!(1234)
1212

13-
function unitarity_test(as::Vector{I}, bs::Vector{I},cs::Vector{I}) where {I <: BimoduleSector} # abstractvector?
13+
function unitarity_test(as::V, bs::V, cs::V) where {V <: AbstractVector{<:BimoduleSector}}
1414
@assert all(a.j == b.i for a in as, b in bs)
1515
@assert all(b.j == c.i for b in bs, c in cs)
1616

@@ -19,12 +19,9 @@ function unitarity_test(as::Vector{I}, bs::Vector{I},cs::Vector{I}) where {I <:
1919
es = collect(intersect((a, b), map(dual, (c, dual(d)))))
2020
fs = collect(intersect((b, c), map(dual, (dual(d), a))))
2121
Fblocks = Vector{Any}()
22-
for e in es
23-
for f in fs
24-
Fs = Fsymbol(a, b, c, d, e, f)
25-
push!(Fblocks, reshape(Fs, (size(Fs, 1) * size(Fs, 2),
26-
size(Fs, 3) * size(Fs, 4))))
27-
end
22+
for e in es, f in fs
23+
Fs = Fsymbol(a, b, c, d, e, f)
24+
push!(Fblocks, reshape(Fs, (size(Fs, 1) * size(Fs, 2), size(Fs, 3) * size(Fs, 4))))
2825
end
2926
F = hvcat(length(fs), Fblocks...)
3027
isapprox(F' * F, one(F); atol = 1.0e-12, rtol = 1.0e-12) || return false

0 commit comments

Comments
 (0)