@@ -3,16 +3,16 @@ struct BPEnv{T}
33 messages:: Array{T, 3}
44end
55
6- function _message_tensor (f, :: Type{T} , pspaces:: P ) where {T, P <: ProductSpaceLike }
6+ function _message_tensor (f, :: Type{T} , pspaces:: P ) where {T, P <: ProductSpace }
77 Vp = _to_space (pspaces)
88 V = permute (Vp ← one (Vp), (ntuple (identity, length (pspaces) - 1 ), (length (pspaces),)))
99 return f (T, V)
1010end
1111
12- function BPEnv (Ds_north:: A , Ds_east:: A ) where {A <: AbstractMatrix{<:ProductSpaceLike } }
12+ function BPEnv (Ds_north:: A , Ds_east:: A ) where {A <: AbstractMatrix{<:ProductSpace } }
1313 return BPEnv (randn, ComplexF64, N, Ds_north, Ds_east)
1414end
15- function BPEnv (f, T, Ds_north:: A , Ds_east:: A ) where {A <: AbstractMatrix{<:ProductSpaceLike } }
15+ function BPEnv (f, T, Ds_north:: A , Ds_east:: A ) where {A <: AbstractMatrix{<:ProductSpace } }
1616 # no recursive broadcasting?
1717 Ds_south = _elementwise_dual .(circshift (Ds_north, (- 1 , 0 )))
1818 Ds_west = _elementwise_dual .(circshift (Ds_east, (0 , 1 )))
4141
4242function BPEnv (
4343 D_north:: P , D_east:: P ; unitcell:: Tuple{Int, Int} = (1 , 1 )
44- ) where {P <: ProductSpaceLike }
44+ ) where {P <: ProductSpace }
4545 return BPEnv (randn, ComplexF64, fill (D_north, unitcell), fill (D_east, unitcell))
4646end
4747function BPEnv (
4848 f, T, D_north:: P , D_east:: P ; unitcell:: Tuple{Int, Int} = (1 , 1 )
49- ) where {P <: ProductSpaceLike }
49+ ) where {P <: ProductSpace }
5050 return BPEnv (f, T, N, fill (D_north, unitcell), fill (D_east, unitcell))
5151end
5252
0 commit comments