jopt.csp.spi.arcalgorithm.graph.node
Class BooleanNode

java.lang.Object
  extended byjopt.csp.spi.arcalgorithm.graph.node.AbstractNode
      extended byjopt.csp.spi.arcalgorithm.graph.node.IntNode
          extended byjopt.csp.spi.arcalgorithm.graph.node.BooleanNode
All Implemented Interfaces:
ChoicePointDataSource, Node, NodeChangeSource, NumNode, Storable, TrigExpr

public class BooleanNode
extends IntNode


Nested Class Summary
 
Nested classes inherited from class jopt.csp.spi.arcalgorithm.graph.node.AbstractNode
AbstractNode.DomainListener
 
Constructor Summary
BooleanNode(java.lang.String name, BooleanDomain domain)
          Constructor
 
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
 
Methods inherited from interface jopt.csp.spi.arcalgorithm.graph.node.Node
addedToGraph, getName, inGraph, removedFromGraph, setName
 
Methods inherited from interface jopt.csp.spi.arcalgorithm.graph.node.NodeChangeSource
addDomainChangeListener, addRangeChangeListener, addValueChangeListener, removeDomainChangeListener, removeRangeChangeListener, removeValueChangeListener
 

Constructor Detail

BooleanNode

public BooleanNode(java.lang.String name,
                   BooleanDomain domain)
Constructor

Method Detail

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