Skip to content

Commit

Permalink
add getindex for LazyMStructure over DiracBasis
Browse files Browse the repository at this point in the history
  • Loading branch information
kalmarek committed Dec 6, 2023
1 parent e31ccc7 commit 06cad36
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mstructures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 06cad36

Please sign in to comment.