@@ -2,8 +2,9 @@ struct FusionTreeBlock{I,N₁,N₂,F<:FusionTreePair{I,N₁,N₂}}
2
2
trees:: Vector{F}
3
3
end
4
4
5
- function FusionTreeBlock (uncoupled:: Tuple{NTuple{N₁,I},NTuple{N₂,I}} ,
6
- isdual:: Tuple{NTuple{N₁,Bool},NTuple{N₂,Bool}} ) where {I<: Sector ,N₁,N₂}
5
+ function FusionTreeBlock {I} (uncoupled:: Tuple{NTuple{N₁,I},NTuple{N₂,I}} ,
6
+ isdual:: Tuple{NTuple{N₁,Bool},NTuple{N₂,Bool}} ) where {I<: Sector ,
7
+ N₁,N₂}
7
8
F₁ = fusiontreetype (I, N₁)
8
9
F₂ = fusiontreetype (I, N₂)
9
10
trees = Vector {Tuple{F₁,F₂}} (undef, 0 )
@@ -66,7 +67,7 @@ function bendright(src::FusionTreeBlock)
66
67
(src. uncoupled[2 ]. .. , dual (src. uncoupled[1 ][end ])))
67
68
isdual_dst = (TupleTools. front (src. isdual[1 ]),
68
69
(src. isdual[2 ]. .. , ! (src. isdual[1 ][end ])))
69
- dst = FusionTreeBlock (uncoupled_dst, isdual_dst)
70
+ dst = FusionTreeBlock {sectortype(src)} (uncoupled_dst, isdual_dst)
70
71
71
72
U = transformation_matrix (bendright, dst, src)
72
73
return dst, U
@@ -78,7 +79,7 @@ function bendleft(src::FusionTreeBlock)
78
79
TupleTools. front (src. uncoupled[2 ]))
79
80
isdual_dst = ((src. isdual[1 ]. .. , ! (src. isdual[2 ][end ])),
80
81
TupleTools. front (src. isdual[2 ]))
81
- dst = FusionTreeBlock (uncoupled_dst, isdual_dst)
82
+ dst = FusionTreeBlock {sectortype(src)} (uncoupled_dst, isdual_dst)
82
83
83
84
U = transformation_matrix (bendleft, dst, src)
84
85
return dst, U
@@ -89,7 +90,7 @@ function foldright(src::FusionTreeBlock)
89
90
(dual (first (src. uncoupled[1 ])), src. uncoupled[2 ]. .. ))
90
91
isdual_dst = (Base. tail (src. isdual[1 ]),
91
92
(! first (src. isdual[1 ]), src. isdual[2 ]. .. ))
92
- dst = FusionTreeBlock (uncoupled_dst, isdual_dst)
93
+ dst = FusionTreeBlock {sectortype(src)} (uncoupled_dst, isdual_dst)
93
94
94
95
U = transformation_matrix (foldright, dst, src)
95
96
return dst, U
@@ -101,7 +102,7 @@ function foldleft(src::FusionTreeBlock)
101
102
Base. tail (src. uncoupled[2 ]))
102
103
isdual_dst = ((! first (src. isdual[2 ]), src. isdual[1 ]. .. ),
103
104
Base. tail (src. isdual[2 ]))
104
- dst = FusionTreeBlock (uncoupled_dst, isdual_dst)
105
+ dst = FusionTreeBlock {sectortype(src)} (uncoupled_dst, isdual_dst)
105
106
106
107
U = transformation_matrix (foldleft, dst, src)
107
108
return dst, U
@@ -212,7 +213,7 @@ function artin_braid(src::FusionTreeBlock{I,N,0}, i; inv::Bool=false) where {I,N
212
213
isdual = src. isdual[1 ]
213
214
isdual′ = TupleTools. setindex (isdual, isdual[i], i + 1 )
214
215
isdual′ = TupleTools. setindex (isdual′, isdual[i + 1 ], i)
215
- dst = FusionTreeBlock ((uncoupled′, ()), (isdual′, ()))
216
+ dst = FusionTreeBlock {I} ((uncoupled′, ()), (isdual′, ()))
216
217
217
218
# TODO : do we want to rewrite `artin_braid` to take double trees instead?
218
219
U = transformation_matrix (dst, src) do (f₁, f₂)
@@ -228,7 +229,7 @@ function braid(src::FusionTreeBlock{I,N,0}, p::NTuple{N,Int},
228
229
if FusionStyle (I) isa UniqueFusion && BraidingStyle (I) isa SymmetricBraiding
229
230
uncoupled′ = TupleTools. _permute (src. uncoupled[1 ], p)
230
231
isdual′ = TupleTools. _permute (src. isdual[1 ], p)
231
- dst = FusionTreeBlock (uncoupled′, isdual′)
232
+ dst = FusionTreeBlock {I} (uncoupled′, isdual′)
232
233
U = transformation_matrix (dst, src) do (f₁, f₂)
233
234
return ((f₁′, f₂) => c for (f₁, c) in braid (f₁, p, levels))
234
235
end
@@ -268,7 +269,7 @@ const _FSBraidKey{I,N₁,N₂} = Tuple{<:FusionTreeBlock{I},Index2Tuple{N₁,N
268
269
uncoupled′ = TupleTools. _permute (dst. uncoupled[1 ], p)
269
270
isdual′ = TupleTools. _permute (dst. isdual[1 ], p)
270
271
271
- dst′ = FusionTreeBlock (uncoupled′, isdual′)
272
+ dst′ = FusionTreeBlock {I} (uncoupled′, isdual′)
272
273
U_tmp = transformation_matrix (dst′, dst) do (f₁, f₂)
273
274
return ((f₁′, f₂) => c for (f₁, c) in braid (f₁, p, levels))
274
275
end
0 commit comments