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 Vars. For a set of expressions Γ, the unifier θ maps elements from Γ to a single expression φ : Γθ = {φ}.
| Modifier and Type | Method and Description |
|---|---|
boolean |
addMapping(Var key,
Var value)
add a new mapping
|
Unifier |
combine(Unifier u)
unifier combination by joining mappings
|
boolean |
containsAll(Unifier u) |
boolean |
containsKey(Var key) |
boolean |
containsValue(Var value) |
Collection<Var> |
get(Var key) |
Unifier |
inverse() |
boolean |
isEmpty() |
Set<Var> |
keySet() |
Map<Var,Collection<Var>> |
map() |
Collection<Map.Entry<Var,Var>> |
mappings() |
Unifier |
merge(Unifier u)
unifier merging by simple mapping addition (no variable clashes assumed)
|
Unifier |
removeTrivialMappings() |
int |
size() |
Collection<Var> |
values() |
@CheckReturnValue Collection<Var> get(Var key)
key - specific variableboolean addMapping(Var key, Var value)
key - variablevalue - term@CheckReturnValue boolean isEmpty()
@CheckReturnValue Map<Var,Collection<Var>> map()
@CheckReturnValue Set<Var> keySet()
@CheckReturnValue Collection<Var> values()
@CheckReturnValue Collection<Map.Entry<Var,Var>> mappings()
@CheckReturnValue boolean containsKey(Var key)
key - variable to be inspected for presence@CheckReturnValue boolean containsValue(Var value)
value - term to be checked for presence@CheckReturnValue boolean containsAll(Unifier u)
u - unifier to compare withUnifier merge(Unifier u)
u - unifier to be merged with this unifierUnifier combine(Unifier u)
u - unifier to be combined with this unifierUnifier removeTrivialMappings()
@CheckReturnValue Unifier inverse()
@CheckReturnValue int size()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.