We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4da1880 commit de9bd92Copy full SHA for de9bd92
src/tensors/adjoint.jl
@@ -42,17 +42,12 @@ function Base.getindex(iter::BlockIterator{<:AdjointTensorMap}, c::Sector)
42
return adjoint(Base.getindex(iter.structure, c))
43
end
44
45
-function Base.getindex(
46
- t::AdjointTensorMap{T, S, N₁, N₂}, f₁::FusionTree{I, N₁}, f₂::FusionTree{I, N₂}
+Base.@propagate_inbounds function subblock(
+ t::AdjointTensorMap{T, S, N₁, N₂}, (f₁, f₂)::Tuple{FusionTree{I, N₁}, FusionTree{I, N₂}}
47
) where {T, S, N₁, N₂, I}
48
tp = parent(t)
49
- subblock = getindex(tp, f₂, f₁)
50
- return permutedims(conj(subblock), (domainind(tp)..., codomainind(tp)...))
51
-end
52
-function Base.setindex!(
53
- t::AdjointTensorMap{T, S, N₁, N₂}, v, f₁::FusionTree{I, N₁}, f₂::FusionTree{I, N₂}
54
- ) where {T, S, N₁, N₂, I}
55
- return copy!(getindex(t, f₁, f₂), v)
+ data = subblock(tp, (f₁, f₂))
+ return permutedims(conj(data), (domainind(tp)..., codomainind(tp)...))
56
57
58
# Show
0 commit comments