jopt.csp.spi.arcalgorithm.graph.node
Class BooleanNode
java.lang.Object
jopt.csp.spi.arcalgorithm.graph.node.AbstractNode
jopt.csp.spi.arcalgorithm.graph.node.IntNode
jopt.csp.spi.arcalgorithm.graph.node.BooleanNode
- All Implemented Interfaces:
- ChoicePointDataSource, Node, NodeChangeSource, NumNode, Storable, TrigExpr
- public class BooleanNode
- extends IntNode
Method Summary |
boolean |
isFalse()
Returns true if this domain is bound to a false value |
boolean |
isInDomain(java.lang.Object val)
Returns true if value is in domain |
boolean |
isTrue()
Returns true if this domain is bound to a true value |
void |
setFalse()
Attempts to reduce domain to a false value |
void |
setTrue()
Attempts to reduce domain to a true value |
Methods inherited from class jopt.csp.spi.arcalgorithm.graph.node.IntNode |
choicePointStackSet, clearDelta, deltaValues, getDomain, getMax, getMin, getNextHigher, getNextLower, getNumberType, getNumMax, getNumMin, getPrecision, getSize, getState, isBound, isInDomain, removeDomain, removeRange, removeValue, restoreState, setChoicePointStack, setDomain, setMax, setMin, setRange, setValue, toString, values |
Methods inherited from class jopt.csp.spi.arcalgorithm.graph.node.AbstractNode |
addDomainChangeListener, addedToGraph, addRangeChangeListener, addValueChangeListener, equals, getName, hashCode, inGraph, removedFromGraph, removeDomainChangeListener, removeRangeChangeListener, removeValueChangeListener, setName |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
BooleanNode
public BooleanNode(java.lang.String name,
BooleanDomain domain)
- Constructor
isInDomain
public boolean isInDomain(java.lang.Object val)
- Returns true if value is in domain
- Specified by:
isInDomain
in interface Node
- Overrides:
isInDomain
in class IntNode
setTrue
public void setTrue()
throws jopt.csp.variable.PropagationFailureException
- Attempts to reduce domain to a true value
- Throws:
jopt.csp.variable.PropagationFailureException
- If domain is empty
setFalse
public void setFalse()
throws jopt.csp.variable.PropagationFailureException
- Attempts to reduce domain to a false value
- Throws:
jopt.csp.variable.PropagationFailureException
- If domain is empty
isTrue
public boolean isTrue()
- Returns true if this domain is bound to a true value
isFalse
public boolean isFalse()
- Returns true if this domain is bound to a false value