Module org.chocosolver.solver
Class UndirectedGraphVarImpl
- java.lang.Object
-
- org.chocosolver.solver.variables.impl.AbstractVariable
-
- org.chocosolver.solver.variables.impl.AbstractGraphVar<UndirectedGraph>
-
- org.chocosolver.solver.variables.impl.UndirectedGraphVarImpl
-
- All Implemented Interfaces:
java.lang.Comparable<Variable>
,Identity
,GraphVar<UndirectedGraph>
,UndirectedGraphVar
,Variable
- Direct Known Subclasses:
UndirectedNodeInducedGraphVarImpl
public class UndirectedGraphVarImpl extends AbstractGraphVar<UndirectedGraph> implements UndirectedGraphVar
-
-
Field Summary
-
Fields inherited from class org.chocosolver.solver.variables.impl.AbstractGraphVar
delta, LB, n, reactOnModification, UB
-
-
Constructor Summary
Constructors Constructor Description UndirectedGraphVarImpl(java.lang.String name, Model solver, UndirectedGraph LB, UndirectedGraph UB)
Creates a graph variable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
removeNode(int x, ICause cause)
Remove node x from the domain Removes x from the upper bound graph-
Methods inherited from class org.chocosolver.solver.variables.impl.AbstractGraphVar
createDelta, createScheduler, enforceEdge, enforceNode, getDelta, getLB, getNbMaxNodes, getTypeAndKind, getUB, getValueAsBoolMatrix, instantiateTo, instantiateTo, isInstantiated, monitorDelta, notifyPropagators, removeEdge, toString
-
Methods inherited from class org.chocosolver.solver.variables.impl.AbstractVariable
addMonitor, asBoolVar, asIntVar, asRealVar, asSetVar, clearEvents, compareTo, contradiction, equals, forEachPropagator, getCause, getEvtScheduler, getId, getMask, getModel, getName, getNbProps, getNbViews, getView, hashCode, instantiationWorldIndex, isAConstant, isBool, isScheduled, link, notifyMonitors, notifyViews, recordWorldIndex, removeMonitor, schedule, schedulePropagators, storeEvents, streamPropagators, subscribeView, swapOnPassivate, unlink, unschedule
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.chocosolver.solver.variables.GraphVar
enforceEdge, enforceNode, getDelta, getDomainSize, getLB, getMandatoryNodes, getMandatoryPredecessorsOf, getMandatorySuccessorsOf, getNbMaxNodes, getPotentialNodes, getPotentialPredecessorOf, getPotentialSuccessorsOf, getUB, instantiateTo, monitorDelta, removeEdge
-
Methods inherited from interface org.chocosolver.solver.variables.UndirectedGraphVar
getMandatoryNeighborsOf, getPotentialNeighborsOf, getValue, isDirected
-
Methods inherited from interface org.chocosolver.solver.variables.Variable
addMonitor, asBoolVar, asIntVar, asRealVar, asSetVar, clearEvents, contradiction, createDelta, forEachPropagator, getCause, getEnvironment, getEvtScheduler, getMask, getModel, getName, getNbProps, getNbViews, getTypeAndKind, getView, instantiationWorldIndex, isAConstant, isInstantiated, isScheduled, link, notifyMonitors, notifyPropagators, notifyViews, recordWorldIndex, removeMonitor, schedule, schedulePropagators, storeEvents, streamPropagators, subscribeView, swapOnPassivate, unlink, unschedule
-
-
-
-
Constructor Detail
-
UndirectedGraphVarImpl
public UndirectedGraphVarImpl(java.lang.String name, Model solver, UndirectedGraph LB, UndirectedGraph UB)
Creates a graph variable- Parameters:
name
-solver
-LB
-UB
-
-
-
Method Detail
-
removeNode
public boolean removeNode(int x, ICause cause) throws ContradictionException
Description copied from class:AbstractGraphVar
Remove node x from the domain Removes x from the upper bound graph- Specified by:
removeNode
in interfaceGraphVar<UndirectedGraph>
- Overrides:
removeNode
in classAbstractGraphVar<UndirectedGraph>
- Parameters:
x
- node's indexcause
- algorithm which is related to the removal- Returns:
- true iff the removal has an effect
- Throws:
ContradictionException
-
-