Skip to content

Commit

Permalink
Discard part that is (due to previous dispatched) no longer necessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Dec 2, 2024
1 parent bc296c3 commit dcf2773
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/ValidationManifold.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,21 +135,11 @@ function _vMc(M::ValidationManifold, f, contexts::NTuple{N,Symbol}) where {N}
end
return true
end
# Sub tests: is any of a in b? Then return false
# If a is in or equal to b
# Sub tests: is any of a in b? Then return false – b is from before always a symbol already
# If a and b are symbols, equality is checked
_vMc(a::Symbol, b::Symbol) = !(a === b)
_vMc(a::Symbol, b::Union{<:NTuple{N,Symbol} where {N},<:AbstractVector{Symbol}}) = !(a b)
# If a is multiple, then test all of them
# If a is a vector multiple, then return false if b appears in a
_vMc(a::Union{<:NTuple{N,Symbol} where {N},<:AbstractVector{Symbol}}, b::Symbol) = !(b a)
function _vMc(
a::Union{<:NTuple{N,Symbol} where {N},<:AbstractVector{Symbol}},
b::Union{<:NTuple{N,Symbol} where {N},<:AbstractVector{Symbol}},
)
for ai in a
(ai b) && return false
end
return true
end

"""
ValidationMPoint{P} <: AbstractManifoldPoint
Expand Down

0 comments on commit dcf2773

Please sign in to comment.