public class NeqComplementState extends AtomicState
Query state corresponding to an atomic query (ReasonerAtomicQuery) with neq predicates (NeqPredicate).
Defining the answer to the entry query Q as a set B:
B = Ans{R(x1, x2, ..., xn), xj = ..., xi != xj}
We find the answer to the query by finding the complement:
B = A\C,
where
A = Ans{R(x1, x2, ..., xn), xj = ...}
C = Ans{R(x1, x2, ..., xn), xj = ..., xi = xj}
| Constructor and Description |
|---|
NeqComplementState(ReasonerAtomicQuery q,
Answer sub,
Unifier u,
QueryStateBase parent,
Set<ReasonerAtomicQuery> subGoals,
QueryCache<ReasonerAtomicQuery> cache) |
| Modifier and Type | Method and Description |
|---|---|
ResolutionState |
generateSubGoal() |
ResolutionState |
propagateAnswer(AnswerState state)
propagates the answer state up the tree and acknowledges (caches) its substitution
|
getUnifiergetSubstitution, isAnswerState, isTopStatepublic NeqComplementState(ReasonerAtomicQuery q, Answer sub, Unifier u, QueryStateBase parent, Set<ReasonerAtomicQuery> subGoals, QueryCache<ReasonerAtomicQuery> cache)
public ResolutionState propagateAnswer(AnswerState state)
QueryStateBasestate - to propagatepublic ResolutionState generateSubGoal()
generateSubGoal in class QueryState<ReasonerAtomicQuery>Copyright © 2018 Grakn Labs Ltd. All rights reserved.