From 06cad362bb579b0f702e1986abf51f63e4211f1f Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Wed, 6 Dec 2023 19:22:44 +0100 Subject: [PATCH] add getindex for LazyMStructure over DiracBasis --- src/mstructures.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mstructures.jl b/src/mstructures.jl index e6ad6d9..d299a75 100644 --- a/src/mstructures.jl +++ b/src/mstructures.jl @@ -61,3 +61,7 @@ Base.@propagate_inbounds function Base.getindex( gh in basis(mstr) || throw(ProductNotWellDefined(i, j, "$g ยท $h = $gh")) return DiracDelta(gh) end + +Base.@propagate_inbounds function Base.getindex(::LazyMStructure{I,<:DiracBasis{T}}, x::T, y::T) where {I,T} + return StarAlgebras.DiracDelta(x * y) +end