jopt.csp.spi.arcalgorithm.graph.arc.hyper
Class TernaryNumArc
java.lang.Object
jopt.csp.spi.arcalgorithm.graph.arc.AbstractArc
jopt.csp.spi.arcalgorithm.graph.arc.hyper.HyperArc
jopt.csp.spi.arcalgorithm.graph.arc.hyper.TernaryNumArc
- All Implemented Interfaces:
- Arc, NumArc, NumConstants
- Direct Known Subclasses:
- TernaryNumDiffArc, TernaryNumLogArc, TernaryNumPowerArc, TernaryNumProdArc, TernaryNumProdReflexArc, TernaryNumQuotAlternateArc, TernaryNumQuotArc, TernaryNumQuotReflexArc, TernaryNumSumArc
- public abstract class TernaryNumArc
- extends HyperArc
- implements NumArc
Abstract base arc for numeric arc with 3 variables
Fields inherited from interface jopt.csp.spi.util.NumConstants |
ADD, DIVIDE, DIVIDE_BY, DIVIDE_BY_CEIL, DIVIDE_BY_FLOOR, DIVIDE_CEIL, DIVIDE_FLOOR, DOUBLE, DOUBLE_NEG_INF, DOUBLE_POS_INF, DOUBLE_ZERO, EQ, FLOAT, FLOAT_NEG_INF, FLOAT_POS_INF, FLOAT_ZERO, GEQ, GT, HALF_PI, INTEGER, INTEGER_MAX, INTEGER_MIN, INTEGER_ZERO, LEQ, LONG, LONG_MAX, LONG_MIN, LONG_ZERO, LT, MULTIPLY, NEQ, ONE_AND_HALF_PI, PI, RANGE, SUBTRACT, SUBTRACT_FROM, TWO_PI |
Method Summary |
boolean |
isBinary()
Returns true if constraint is binary |
void |
propagate()
Attempts to reduce values in target node domain based on values
in all source nodes |
void |
propagate(Node src)
Attempts to reduce values in target node domain based on values
in given source node |
java.lang.String |
toString()
Returns string representation of arc |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TernaryNumArc
public TernaryNumArc(NumNode x,
NumNode y,
NumNode z,
int nodeType,
int arcType,
int operation)
- Constructor
- Parameters:
x
- X variable in equationy
- Y variable in equationz
- Z variable in equationnodeType
- Node variable type (Integer, Long, Float, Decimal)arcType
- Arc relation type (Eq, Lt, Gt, etc.)operation
- Type of operation being performed (+, -, *, /)
isBinary
public boolean isBinary()
- Returns true if constraint is binary
propagate
public final void propagate()
throws jopt.csp.variable.PropagationFailureException
- Description copied from interface:
Arc
- Attempts to reduce values in target node domain based on values
in all source nodes
- Specified by:
propagate
in interface Arc
- Throws:
jopt.csp.variable.PropagationFailureException
- If domain of target node becomes empty
propagate
public final void propagate(Node src)
throws jopt.csp.variable.PropagationFailureException
- Description copied from interface:
Arc
- Attempts to reduce values in target node domain based on values
in given source node
- Specified by:
propagate
in interface Arc
- Parameters:
src
- Source node that caused propagation to occur
- Throws:
jopt.csp.variable.PropagationFailureException
- If domain of target node becomes empty
toString
public java.lang.String toString()
- Returns string representation of arc