atomPattern, varName| Constructor and Description |
|---|
Relation(VarAdmin pattern,
IdPredicate predicate,
ReasonerQuery par) |
Relation(VarName name,
VarName typeVariable,
Map<VarName,Var> roleMap,
IdPredicate pred,
ReasonerQuery par) |
| Modifier and Type | Method and Description |
|---|---|
Relation |
addType(Type type) |
boolean |
containsVar(VarName name) |
Atomic |
copy() |
boolean |
equals(Object obj) |
int |
equivalenceHashCode() |
protected VarName |
extractValueVariableName(VarAdmin var) |
Set<TypeAtom> |
getMappedTypeConstraints() |
Set<Unifier> |
getPermutationUnifiers(Atom headAtom) |
Set<RelationPlayer> |
getRelationPlayers() |
Set<VarName> |
getRolePlayers() |
Map<RoleType,javafx.util.Pair<VarName,Type>> |
getRoleVarTypeMap() |
Unifier |
getUnifier(Atomic pAtom)
get unifiers by comparing this atom with parent
|
Set<IdPredicate> |
getUnmappedIdPredicates() |
Set<VarName> |
getUnmappedRolePlayers() |
Set<TypeAtom> |
getUnmappedTypeConstraints() |
Set<VarName> |
getVarNames() |
int |
hashCode() |
boolean |
hasSubstitution() |
void |
inferTypes()
infers types (type, role types) fo the atom if applicable/possible
|
boolean |
isEquivalent(Object obj) |
boolean |
isRelation() |
protected boolean |
isRuleApplicable(InferenceRule child) |
boolean |
isRuleResolvable() |
boolean |
isSelectable() |
boolean |
isType() |
Atom |
rewriteToUserDefined()
rewrites the atom to one with user defined name
|
javafx.util.Pair<Atom,Unifier> |
rewriteToUserDefinedWithUnifiers()
rewrites the atom to one with user defined name, need unifiers for cases when we have variable clashes
between the relation variable and relation players
|
protected void |
setValueVariable(VarName var) |
void |
unify(Unifier mappings)
perform unification on the atom by applying unifiers
|
extractTypeId, getTypegetCombinedPattern, getPredicate, predicatesEquivalent, setParentQuery, setPredicategetLinkedAtoms, getValueVariable, isBinary, requiresMaterialisationgetApplicableRules, getIdPredicates, getNonSelectableConstraints, getPredicates, getTypeConstraints, getTypeId, getValuePredicates, isAtom, isRecursive, isResourcegetParentQuery, getPattern, getVarName, graph, isUserDefinedName, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitisPredicatepublic Relation(VarAdmin pattern, IdPredicate predicate, ReasonerQuery par)
public Relation(VarName name, VarName typeVariable, Map<VarName,Var> roleMap, IdPredicate pred, ReasonerQuery par)
public Set<RelationPlayer> getRelationPlayers()
protected VarName extractValueVariableName(VarAdmin var)
extractValueVariableName in class TypeAtomprotected void setValueVariable(VarName var)
setValueVariable in class TypeAtompublic boolean equals(Object obj)
equals in class BinaryBasepublic int hashCode()
hashCode in class BinaryBasepublic boolean isEquivalent(Object obj)
isEquivalent in interface AtomicisEquivalent in class BinaryBasepublic int equivalenceHashCode()
equivalenceHashCode in interface AtomicequivalenceHashCode in class Binarypublic boolean isRelation()
isRelation in class Atompublic boolean isSelectable()
isSelectable in interface AtomicisSelectable in class TypeAtompublic boolean isType()
public boolean hasSubstitution()
hasSubstitution in class Atomprotected boolean isRuleApplicable(InferenceRule child)
isRuleApplicable in class BinaryBasepublic boolean isRuleResolvable()
isRuleResolvable in interface AtomicisRuleResolvable in class Atompublic void inferTypes()
AtominferTypes in class Atompublic boolean containsVar(VarName name)
containsVar in interface AtomiccontainsVar in class AtomBasename - variable namepublic void unify(Unifier mappings)
AtomBasepublic Set<VarName> getVarNames()
getVarNames in interface AtomicgetVarNames in class BinaryBasepublic Set<VarName> getRolePlayers()
public Set<VarName> getUnmappedRolePlayers()
public Set<IdPredicate> getUnmappedIdPredicates()
getUnmappedIdPredicates in class Atompublic Set<TypeAtom> getMappedTypeConstraints()
getMappedTypeConstraints in class Atompublic Set<TypeAtom> getUnmappedTypeConstraints()
getUnmappedTypeConstraints in class Atompublic Set<Unifier> getPermutationUnifiers(Atom headAtom)
getPermutationUnifiers in class Atompublic Map<RoleType,javafx.util.Pair<VarName,Type>> getRoleVarTypeMap()
getRoleVarTypeMap in class Atompublic Unifier getUnifier(Atomic pAtom)
AtomBasegetUnifier in interface AtomicgetUnifier in class BinaryBasepAtom - atom defining variable namespublic Atom rewriteToUserDefined()
AtomrewriteToUserDefined in class Atompublic javafx.util.Pair<Atom,Unifier> rewriteToUserDefinedWithUnifiers()
rewriteToUserDefinedWithUnifiers in class AtomCopyright © 2017 Grakn Labs Ltd. All rights reserved.