public interface Substitution extends Comparable<Substitution>, AppendableToStringBuilder
Modifier and Type | Method and Description |
---|---|
Substitution |
aggregate(Substitution s)
(const) This method construct a new Substitution which is the aggregation
of this substitution with the specified one.
|
boolean |
aggregate(Variable var,
Term image)
The aggregation of a substitution is more complex that just add an new
mapping for a new variable.
|
void |
apply(AtomSet src,
AtomSet target)
Insert the application of this substitution on the src atom set into the
target atom set.
|
void |
apply(InMemoryAtomSet src,
InMemoryAtomSet target)
Insert the application of this substitution on the src atom set into the
target atom set.
|
Substitution |
compose(Substitution s)
(CONST)
This method construct a new Substitution which is the composition of this substitution with the specified one. |
boolean |
compose(Variable term,
Term substitut)
For example, if the current substitution is {Y -> Z} and you compose it with
{X -> Y, V -> U}, the result is {X -> Z, Y -> Z, V -> U}.
|
Atom |
createImageOf(Atom atom)
Apply this substitution on an atom.
|
InMemoryAtomSet |
createImageOf(AtomSet src)
Apply this substitution on an atom set.
|
List<Term> |
createImageOf(Collection<? extends Term> terms)
Get the image of each terms of the specified list.
|
InMemoryAtomSet |
createImageOf(InMemoryAtomSet src)
Apply this substitution on an atom set.
|
Rule |
createImageOf(Rule rule)
Apply this substitution on the given rule.
|
Term |
createImageOf(Term term)
Get the image of the given term by this substitution, if there is no
image specified return the term itself.
|
Set<Variable> |
getTerms()
Get the domain of this substitution.
|
Set<Term> |
getValues()
Get the codomain of this substitution.
|
boolean |
put(Substitution s)
Add all mappings from an other substitution instance.
|
boolean |
put(Variable var,
Term image)
Adds a mapping from the specified variable into the specified image to
this substitution.
|
boolean |
remove(Variable var)
Remove the mapping for the specified variable.
|
compareTo
appendTo
Set<Variable> getTerms()
Set<Term> getValues()
Term createImageOf(Term term)
term
- List<Term> createImageOf(Collection<? extends Term> terms)
terms
- boolean put(Variable var, Term image)
var
- image
- boolean put(Substitution s)
s
- boolean remove(Variable var)
var
- boolean aggregate(Variable var, Term image)
var
- image
- Substitution aggregate(Substitution s)
s
- boolean compose(Variable term, Term substitut)
term
- substitut
- Substitution compose(Substitution s)
s
- Atom createImageOf(Atom atom)
atom
- (const)InMemoryAtomSet createImageOf(AtomSet src) throws AtomSetException
src
- (const)AtomSetException
InMemoryAtomSet createImageOf(InMemoryAtomSet src)
src
- (const)Rule createImageOf(Rule rule)
rule
- (const)void apply(AtomSet src, AtomSet target) throws AtomSetException
src
- (const)target
- AtomSetException
void apply(InMemoryAtomSet src, InMemoryAtomSet target)
src
- (const)target
- Copyright © 2014–2018 GraphIK (INRIA - LIRMM). All rights reserved.