public class SetDefinitionKernel extends AbstractKernel implements ConstraintKernel
frameworks
Constructor and Description |
---|
SetDefinitionKernel(StandardPredicate setP,
SetTerm s1,
SetTerm s2,
Variable[] variables,
Predicate compareP,
EntityAggregatorFunction compare) |
SetDefinitionKernel(StandardPredicate setP,
SetTerm s1,
SetTerm s2,
Variable[] variables,
Predicate compareP,
EntityAggregatorFunction compare,
boolean soft) |
SetDefinitionKernel(StandardPredicate setP,
SetTerm s1,
SetTerm s2,
Variable[] variables,
Predicate compareP,
String compare) |
SetDefinitionKernel(StandardPredicate setP,
SetTerm s1,
SetTerm s2,
Variable[] variables,
Predicate compareP,
String compare,
boolean soft) |
Modifier and Type | Method and Description |
---|---|
Kernel |
clone() |
EntityAggregatorFunction |
getAggregator() |
String |
getName() |
Parameters |
getParameters() |
void |
groundAll(AtomManager atomManager,
GroundKernelStore gks)
Adds all missing, potentially unsatisfied
GroundKernels
to a GroundKernelStore based on an AtomManager . |
int |
hashCode() |
void |
notifyAtomEvent(AtomEvent event,
GroundKernelStore gks)
Handles an AtomEvent using the specified GroundKernelStore.
|
void |
registerForAtomEvents(AtomEventFramework framework)
Registers with a specific AtomEventFramework to handle atom events.
|
void |
setParameters(Parameters para)
Sets the Parameters of this Kernel.
|
String |
toString() |
void |
unregisterForAtomEvents(AtomEventFramework framework)
Unregisters from a specific AtomEventFrameWork to no longer handle atom events.
|
notifyAtomEvent, registerForAtomEvents, unregisterForAtomEvents
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
registerForAtomEvents, unregisterForAtomEvents
notifyAtomEvent
public SetDefinitionKernel(StandardPredicate setP, SetTerm s1, SetTerm s2, Variable[] variables, Predicate compareP, EntityAggregatorFunction compare, boolean soft)
public SetDefinitionKernel(StandardPredicate setP, SetTerm s1, SetTerm s2, Variable[] variables, Predicate compareP, String compare, boolean soft)
public SetDefinitionKernel(StandardPredicate setP, SetTerm s1, SetTerm s2, Variable[] variables, Predicate compareP, String compare)
public SetDefinitionKernel(StandardPredicate setP, SetTerm s1, SetTerm s2, Variable[] variables, Predicate compareP, EntityAggregatorFunction compare)
public EntityAggregatorFunction getAggregator()
public Kernel clone()
clone
in interface Kernel
clone
in class AbstractKernel
public String getName()
public Parameters getParameters()
getParameters
in interface Kernel
getParameters
in class AbstractKernel
public void setParameters(Parameters para)
Kernel
setParameters
in interface Kernel
setParameters
in class AbstractKernel
para
- the new parameterizationpublic void groundAll(AtomManager atomManager, GroundKernelStore gks)
Kernel
GroundKernels
to a GroundKernelStore
based on an AtomManager
.
Specifically, will add any GroundKernel templated by this Kernel that satisfies all the following conditions:
NumericUtilities.strictEpsilon
for some assignment of truth values to the RandomVariableAtom
s
currently persisted in the AtomManager's Database given the truth
values of the ObservedAtom
s and assuming that any RandomVariableAtom
not persisted has a truth value of 0.0.GroundCompatibilityKernel
, its
incompatibility is not constant with respect to the truth values
of RandomVariableAtoms (including those not persisted in the
AtomManager's Database).
Only GroundKernels which satisfy these conditions should be added.
groundAll
in interface Kernel
atomManager
- AtomManager on which to base the groundinggks
- store for new GroundKernelsGroundCompatibilityKernel.getIncompatibility()
,
GroundConstraintKernel.getInfeasibility()
public void notifyAtomEvent(AtomEvent event, GroundKernelStore gks)
AbstractKernel
Kernels need to have registered to handle this event with an AtomEventFramework.
notifyAtomEvent
in class AbstractKernel
event
- the AtomEvent that occurredgks
- the GroundKernelStore to usepublic void registerForAtomEvents(AtomEventFramework framework)
AbstractKernel
Subclasses are expected to register for the same AtomEvents and Predicates at all times. Kernels that do not fit this behavior should not extend this class.
registerForAtomEvents
in class AbstractKernel
framework
- The event framework to register withpublic void unregisterForAtomEvents(AtomEventFramework framework)
AbstractKernel
Subclasses are expected to have registered for the same AtomEvents and Predicates at all times. Kernels that do not fit this behavior should not extend this class.
unregisterForAtomEvents
in class AbstractKernel
framework
- The event framework to unregister from