Interface IView
-
- All Superinterfaces:
Comparable<Variable>,ICause,Identity,Variable
- All Known Implementing Classes:
BoolNotView,IntView,MinusView,OffsetView,RealView,ScaleView
public interface IView extends ICause, Variable
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.- Since:
- 26/08/11
- Author:
- Charles Prud'homme
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VariablegetVariable()Return the basis variablevoidjustifyEvent(IntVar var, ICause cause, 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.voidnotify(IEventType event)To notify a view that the variable is observed has been modified.-
Methods inherited from interface java.lang.Comparable
compareTo
-
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, getPIndices, getPropagator, getPropagators, getTypeAndKind, getViews, isAConstant, isInstantiated, link, notifyMonitors, notifyPropagators, notifyViews, removeMonitor, setPIndice, storeEvents, subscribeView, swapOnActivate, swapOnPassivate, unlink
-
-
-
-
Method Detail
-
getVariable
Variable getVariable()
Return the basis variable- Returns:
- variable observed
-
justifyEvent
void justifyEvent(IntVar var, ICause cause, 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.- Parameters:
var- modified variablecause- cause of the modificationmask- type of modificationone- an inttwo- an intthree- an int
-
notify
void notify(IEventType event) throws ContradictionException
To notify a view that the variable is observed has been modified.- Parameters:
event- the event received by the observed variable- Throws:
ContradictionException- if a failure occurs
-
-