From f35b2a96f471b3551933e0ee8148cc6c4da07150 Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Tue, 10 Dec 2024 14:04:41 +0100 Subject: [PATCH] Base.in(x, object) is needed for fast DiracBasis indexing --- test/test_example_words.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_example_words.jl b/test/test_example_words.jl index 5093366..c956d65 100644 --- a/test/test_example_words.jl +++ b/test/test_example_words.jl @@ -56,6 +56,8 @@ function Base.iterate(aw::FreeWords) stack = [w] return w, (stack, 1) end +# This is needed for fast indexing into DiracBasis: +Base.in(x::Word, fw::FreeWords) = x.alphabet == fw.alphabet function Base.iterate(aw::FreeWords, state) stack, l = state