11"""
2- struct ProductSpace{S<: ElementarySpace, N} <: CompositeSpace{S}
2+ struct ProductSpace{S <: ElementarySpace, N} <: CompositeSpace{S}
33
44A `ProductSpace` is a tensor product space of `N` vector spaces of type
5- `S<: ElementarySpace`. Only tensor products between [`ElementarySpace`](@ref) objects of the
5+ `S <: ElementarySpace`. Only tensor products between [`ElementarySpace`](@ref) objects of the
66same type are allowed.
77"""
88struct ProductSpace{S <: ElementarySpace , N} <: CompositeSpace{S}
8787
8888# more specific methods
8989"""
90- sectors(P::ProductSpace{S, N}) where {S<: ElementarySpace}
90+ sectors(P::ProductSpace{S, N}) where {S <: ElementarySpace}
9191
9292Return an iterator over all possible combinations of sectors (represented as an
9393`NTuple{N, sectortype(S)}`) that can appear within the tensor product space `P`.
@@ -151,9 +151,9 @@ function blocksectors(P::ProductSpace{S, N}) where {S, N}
151151 end
152152 bs = Vector {I} ()
153153 if N == 0
154- for u in allunits (I)
155- push! (bs, u)
156- end
154+ for u in allunits (I)
155+ push! (bs, u)
156+ end
157157 return bs
158158 elseif N == 1
159159 for s in sectors (P)
@@ -199,7 +199,7 @@ hasblock(P::ProductSpace, c::Sector) = !isempty(fusiontrees(P, c))
199199 blockdim(P::ProductSpace, c::Sector)
200200
201201Return the total dimension of a coupled sector `c` in the product space, by summing over
202- all `dim(P, s)` for all tuples of sectors `s::NTuple{N, <:Sector}` that can fuse to `c`,
202+ all `dim(P, s)` for all tuples of sectors `s::NTuple{N, <: Sector}` that can fuse to `c`,
203203counted with the correct multiplicity (i.e. number of ways in which `s` can fuse to `c`).
204204
205205See also [`hasblock`](@ref) and [`blocksectors`](@ref).
231231
232232# unit element with respect to the monoidal structure of taking tensor products
233233"""
234- one(::S) where {S<: ElementarySpace} -> ProductSpace{S, 0}
235- one(::ProductSpace{S}) where {S<: ElementarySpace} -> ProductSpace{S, 0}
234+ one(::S) where {S <: ElementarySpace} -> ProductSpace{S, 0}
235+ one(::ProductSpace{S}) where {S <: ElementarySpace} -> ProductSpace{S, 0}
236236
237237Return a tensor product of zero spaces of type `S`, i.e. this is the unit object under the
238238tensor product operation, such that `V ⊗ one(V) == V`.
@@ -251,7 +251,7 @@ fuse(P::ProductSpace{S, 0}) where {S <: ElementarySpace} = unitspace(S)
251251fuse (P:: ProductSpace{S} ) where {S <: ElementarySpace } = fuse (P. spaces... )
252252
253253"""
254- insertleftunit(P::ProductSpace, i::Int= length(P) + 1; conj= false, dual= false)
254+ insertleftunit(P::ProductSpace, i::Int = length(P) + 1; conj = false, dual = false)
255255
256256Insert a trivial vector space, isomorphic to the underlying field, at position `i`,
257257which can be specified as an `Int` or as `Val(i)` for improved type stability.
@@ -285,7 +285,7 @@ function insertleftunit(
285285end
286286
287287"""
288- insertrightunit(P::ProductSpace, i= length(P); conj= false, dual= false)
288+ insertrightunit(P::ProductSpace, i = length(P); conj = false, dual = false)
289289
290290Insert a trivial vector space, isomorphic to the underlying field, after position `i`,
291291which can be specified as an `Int` or as `Val(i)` for improved type stability.
0 commit comments