@@ -4,7 +4,7 @@ const StridedStructure{N} = Tuple{NTuple{N, Int}, NTuple{N, Int}, Int}
44# SectorStructure: sector-dependent characterization of HomSpaces
55# ---------------------------------------------------------------
66"""
7- SectorStructure{I, F₁ , F₂ }
7+ SectorStructure{I <: Sector , F <: FusionTreePair }
88
99Sector-only structure of a `HomSpace`: the coupled sectors and all valid fusion tree pairs,
1010depending only on which sectors appear (not their degeneracy dimensions). Shared across
@@ -16,19 +16,18 @@ depending only on which sectors appear (not their degeneracy dimensions). Shared
1616
1717See also [`sectorstructure`](@ref), [`DegeneracyStructure`](@ref).
1818"""
19- struct SectorStructure{I, F₁ , F₂ }
19+ struct SectorStructure{I <: Sector , F <: FusionTreePair{I} }
2020 blocksectors:: Indices{I}
21- fusiontrees:: Indices{Tuple{F₁, F₂} }
21+ fusiontrees:: Indices{F }
2222end
2323
2424Base. @assume_effects :foldable function sectorstructuretype (key:: Hashed{S} ) where {S <: HomSpace }
2525 I = sectortype (S)
26- F₁ = fusiontreetype (I, numout (S))
27- F₂ = fusiontreetype (I, numin (S))
28- return SectorStructure{I, F₁, F₂}
26+ F = fusiontreetype (I, numout (S), numin (S))
27+ return SectorStructure{I, F}
2928end
3029
31- @doc """
30+ """
3231 sectorstructure(W::HomSpace) -> SectorStructure
3332
3433Return the [`SectorStructure`](@ref) for `W`, containing the coupled sectors and fusion tree
@@ -42,13 +41,11 @@ sectorstructure(W::HomSpace) = sectorstructure(Hashed(W, sectorhash, sectorequal
4241@cached function sectorstructure (key:: Hashed{S} ):: sectorstructuretype (key) where {S <: HomSpace }
4342 W = parent (key)
4443 codom, dom = codomain (W), domain (W)
45- I = sectortype (S)
46- N₁, N₂ = numout (S), numin (S)
47- F₁ = fusiontreetype (I, N₁)
48- F₂ = fusiontreetype (I, N₂)
4944
45+ I = sectortype (S)
46+ F = fusiontreetype (I, numout (S), numin (S))
5047 bs = Vector {I} ()
51- trees = Vector {Tuple{F₁, F₂} } ()
48+ trees = Vector {F } ()
5249
5350 for c in _blocksectors (W)
5451 push! (bs, c)
@@ -71,10 +68,10 @@ sectorstructure(W::HomSpace) = sectorstructure(Hashed(W, sectorhash, sectorequal
7168 end
7269 end
7370
74- return SectorStructure {I, F₁, F₂ } (Indices (bs), Indices (trees))
71+ return SectorStructure {I, F} (Indices (bs), Indices (trees))
7572end
7673
77- CacheStyle (:: typeof (sectorstructure), :: Hashed{S} ) where {S <: HomSpace } = GlobalLRUCache ()
74+ CacheStyle (:: typeof (sectorstructure), :: Hashed{<: HomSpace} ) = GlobalLRUCache ()
7875
7976# DegeneracyStructure: degeneracy-dependent characterization of HomSpaces
8077# -----------------------------------------------------------------------
@@ -90,8 +87,7 @@ strides that depend on the degeneracy (multiplicity) dimensions. Specific to a g
9087- `blockstructure`: `Vector` of `((d₁, d₂), range)` values, one per coupled sector, in the
9188 same order as [`sectorstructure`](@ref)`.blocksectors`.
9289- `subblockstructure`: `Vector` of [`StridedStructure`](@ref) `(sizes, strides, offset)`
93- values, one per fusion tree pair, in the same order as
94- [`sectorstructure`](@ref)`.fusiontrees`.
90+ values, one per fusion tree pair, in the same order as [`sectorstructure`](@ref)`.fusiontrees`.
9591
9692See also [`degeneracystructure`](@ref), [`SectorStructure`](@ref).
9793"""
@@ -106,7 +102,7 @@ function degeneracystructuretype(W::HomSpace)
106102 return DegeneracyStructure{N}
107103end
108104
109- @doc """
105+ """
110106 degeneracystructure(W::HomSpace) -> DegeneracyStructure
111107
112108Compute the [`DegeneracyStructure`](@ref) for `W`, describing block sizes, data ranges, and
0 commit comments