Class DefaultNegativeConstraint
java.lang.Object
fr.lirmm.graphik.integraal.core.AbstractRule
fr.lirmm.graphik.integraal.core.DefaultRule
fr.lirmm.graphik.integraal.core.DefaultNegativeConstraint
- All Implemented Interfaces:
NegativeConstraint, Rule, Comparable<Rule>
A negative constraint prevents to have some set of atoms. Its logical
representation is: "¬animal(X) ∧ ¬plant(X)".
The NegativeConstraint Class represent negative constraint by a rule that produce the Bottom atom if the specified atom set is met.
The NegativeConstraint Class represent negative constraint by a rule that produce the Bottom atom if the specified atom set is met.
- Author:
- Clément Sipieter (INRIA) <clement@6pi.fr>
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty unlabeled negative constraint.DefaultNegativeConstraint(InMemoryAtomSet atomSet) Creates an unlabeled negative constraint from an atom set.DefaultNegativeConstraint(CloseableIterator<Atom> atomSet) Creates an unlabeled negative constraint from an atom iterator.Creates an unlabeled negative constraint from an atom iterator.DefaultNegativeConstraint(String label, InMemoryAtomSet atomSet) Creates a labeled negative constraint from an atom set.DefaultNegativeConstraint(String label, CloseableIterator<Atom> atomSet) Creates a labeled negative constraint from an atom iterator.DefaultNegativeConstraint(String label, CloseableIteratorWithoutException<Atom> atomSet) Creates a labeled negative constraint from an atom iterator. -
Method Summary
Modifier and TypeMethodDescriptionvoidAppends this object representation to the provided builder.Methods inherited from class DefaultRule
getBody, getConstants, getExistentials, getFrontier, getHead, getLabel, getLiterals, getTerms, getTerms, getVariables, setBody, setHead, setLabelMethods inherited from interface Comparable
compareToMethods inherited from interface Rule
getConstants, getExistentials, getFrontier, getHead, getLiterals, getVariables
-
Constructor Details
-
DefaultNegativeConstraint
public DefaultNegativeConstraint()Creates an empty unlabeled negative constraint. -
DefaultNegativeConstraint
Creates an unlabeled negative constraint from an atom iterator.- Parameters:
atomSet- the iterator over forbidden atoms- Throws:
IteratorException- if the iterator cannot be consumed
-
DefaultNegativeConstraint
Creates an unlabeled negative constraint from an atom iterator.- Parameters:
atomSet- the iterator over forbidden atoms
-
DefaultNegativeConstraint
Creates an unlabeled negative constraint from an atom set.- Parameters:
atomSet- the forbidden atom set
-
DefaultNegativeConstraint
public DefaultNegativeConstraint(String label, CloseableIterator<Atom> atomSet) throws IteratorException Creates a labeled negative constraint from an atom iterator.- Parameters:
label- the constraint labelatomSet- the iterator over forbidden atoms- Throws:
IteratorException- if the iterator cannot be consumed
-
DefaultNegativeConstraint
Creates a labeled negative constraint from an atom iterator.- Parameters:
label- the constraint labelatomSet- the iterator over forbidden atoms
-
DefaultNegativeConstraint
Creates a labeled negative constraint from an atom set.- Parameters:
label- the constraint labelatomSet- the forbidden atom set
-
-
Method Details
-
appendTo
Appends this object representation to the provided builder.- Parameters:
sb- the target builder
-