From 46b67c05396081720f5ef19d566d5c3630239eea Mon Sep 17 00:00:00 2001 From: guo-yong-zhi <55872791+guo-yong-zhi@users.noreply.github.com> Date: Tue, 28 Dec 2021 21:16:15 +0800 Subject: [PATCH] fix UpdatedSet union! --- src/qtree_functions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qtree_functions.jl b/src/qtree_functions.jl index fe2092b..8fd6a89 100644 --- a/src/qtree_functions.jl +++ b/src/qtree_functions.jl @@ -297,7 +297,7 @@ UpdatedSet(maxlen::Int) = UpdatedSet(maxlen, maxlen, Set{Int}(1:maxlen)) UpdatedSet(labels, maxlen::Int=length(labels)) = UpdatedSet(length(labels), maxlen, Set{Int}(labels)) function Base.union!(s::UpdatedSet, c) s.updatelen = length(c) - length(s.set) == s.maxlen || union!(s.set, c) + length(s.set) == s.maxlen ? s : union!(s.set, c) end Base.empty!(s::UpdatedSet) = empty!(s.set) Base.length(s::UpdatedSet) = length(s.set)