/// <summary> /// Accepts a conjunctive-normal-form expression relevance evaluation visitor. /// </summary> /// <param name="visitor">CNF expression visitor.</param> public Tuple <bool, bool> Accept(IElementCNFRelevanceEvaluationVisitor visitor) { bool positiveCondition = false; bool negativeCondition = true; foreach (var conjunct in this) { var result = conjunct.Accept(visitor); positiveCondition |= result.Item1; negativeCondition &= result.Item2; if (!negativeCondition) { break; } } return(Tuple.Create(positiveCondition, negativeCondition)); }
/// <summary> /// Accepts a conjunctive-normal-form expression relevance evaluation visitor. /// </summary> /// <param name="visitor">CNF expression visitor.</param> public override Tuple <bool, bool> Accept(IElementCNFRelevanceEvaluationVisitor visitor) { return(visitor.Visit(this)); }
/// <summary> /// Accepts a conjunctive-normal-form expression relevance evaluation visitor. /// </summary> /// <param name="visitor">CNF expression visitor.</param> public abstract Tuple <bool, bool> Accept(IElementCNFRelevanceEvaluationVisitor visitor);