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,
QueryState parent,
Set<ReasonerAtomicQuery> subGoals,
QueryCache<ReasonerAtomicQuery> cache) |
| Modifier and Type | Method and Description |
|---|---|
ResolutionState |
generateSubGoal() |
ResolutionState |
propagateAnswer(ai.grakn.graql.internal.reasoner.state.AnswerState state)
propagates the answer state up the tree and acknowledges (caches) its substitution
|
getSubstitution, isAnswerState, isTopStatepublic NeqComplementState(ReasonerAtomicQuery q, Answer sub, Unifier u, QueryState parent, Set<ReasonerAtomicQuery> subGoals, QueryCache<ReasonerAtomicQuery> cache)
public ResolutionState propagateAnswer(ai.grakn.graql.internal.reasoner.state.AnswerState state)
QueryStatestate - to propagatepublic ResolutionState generateSubGoal()
generateSubGoal in class AtomicStateCopyright © 2017 Grakn Labs Ltd. All rights reserved.