- All Known Implementing Classes:
An interface to define views. A view is a specific variable that does not declare any domain but relies on another variable. It converts getters and setters to ensure that the semantic of the view is respected. This is intend to replace very specific propagator such as equality.
- Charles Prud'homme
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description
explain(ExplanationForSignedClause explanation, ValueSortedMap<IntVar> front, Implications ig, int p)Clausal explanation for this cause.
getVariable()Return the basis variable
justifyEvent(IntEventType mask, int one, int two, int three)This methods is related to explanations, it binds an event occurring on the observed variable to the view.
notify(IEventType event)To notify a view that the variable is observed has been modified.
Methods inherited from interface org.chocosolver.solver.variables.Variable
addMonitor, asBoolVar, asIntVar, asRealVar, asSetVar, clearEvents, contradiction, createDelta, getCause, getDelta, getDindex, getEnvironment, getEvtScheduler, getIndexInPropagator, getMask, getModel, getName, getNbProps, getNbViews, getPIndices, getPropagator, getPropagators, getTypeAndKind, getView, isAConstant, isInstantiated, link, notifyMonitors, notifyPropagators, notifyViews, removeMonitor, setPIndice, storeEvents, subscribeView, swapOnActivate, swapOnPassivate, unlink
IntVar getVariable()Return the basis variable
- variable observed
void justifyEvent(IntEventType mask, int one, int two, int three)
mask- type of modification
one- an int
two- an int
three- an int
void notify(IEventType event) throws ContradictionExceptionTo notify a view that the variable is observed has been modified.
event- the event received by the observed variable
ContradictionException- if a failure occurs
default void explain(ExplanationForSignedClause explanation, ValueSortedMap<IntVar> front, Implications ig, int p)Description copied from interface:
ICauseClausal explanation for this cause.
This method must filled explanations with inferred literals. These literals are inferred from the analysis of (a subset of) conflicting nodes stored in front, the implication graph ig and the current node in conflict, not yet contained in front.
Optionally, this method can update front by looking for a predecessor of any node that seems more relevant than the declared one.