public interface Unifier
Interface for resolution unifier defined as a finite set of mappings between variables xi and terms ti: θ = {x1/t1, x2/t2, ..., xi/ti}. Both variables and terms are defined in terms of graql VarNames. For a set of expressions Γ, the unifier θ maps elements from Γ to a single expression φ : Γθ = {φ}.
| Modifier and Type | Method and Description |
|---|---|
VarName |
addMapping(VarName key,
VarName value)
add a new mapping
|
boolean |
containsKey(VarName key) |
boolean |
containsValue(VarName value) |
VarName |
get(VarName key) |
Set<Map.Entry<VarName,VarName>> |
getMappings() |
boolean |
isEmpty() |
Set<VarName> |
keySet() |
Map<VarName,VarName> |
map() |
Unifier |
merge(Unifier d) |
Unifier |
removeTrivialMappings() |
int |
size() |
Collection<VarName> |
values() |
VarName addMapping(VarName key, VarName value)
key - variablevalue - termboolean isEmpty()
Collection<VarName> values()
Set<Map.Entry<VarName,VarName>> getMappings()
boolean containsKey(VarName key)
key - variable to be inspected for presenceboolean containsValue(VarName value)
value - term to be checked for presenceUnifier merge(Unifier d)
d - unifier to be merged with this unifierUnifier removeTrivialMappings()
int size()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.