jopt.csp.spi.arcalgorithm.graph.arc.generic
Class GenericNumSummationReflexArc

java.lang.Object
  extended byjopt.csp.spi.arcalgorithm.graph.arc.AbstractArc
      extended byjopt.csp.spi.arcalgorithm.graph.arc.generic.GenericArc
          extended byjopt.csp.spi.arcalgorithm.graph.arc.generic.GenericNumSummationReflexArc
All Implemented Interfaces:
Arc, NumArc, NumConstants

public class GenericNumSummationReflexArc
extends GenericArc
implements NumArc

Arc representing summation(Zi, i in [1..100]) < A etc.


Field Summary
 
Fields inherited from interface jopt.csp.spi.arcalgorithm.graph.arc.Arc
BINARY, GENERIC, HYPER, NODE, SCHEDULE
 
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
 
Constructor Summary
GenericNumSummationReflexArc(GenericNumConstant a, GenericNumNode z, int nodeType, int arcType, GenericIndex[] indexRange, jopt.csp.variable.CspGenericIndexRestriction sourceIdxRestriction)
          Constructor
GenericNumSummationReflexArc(Node a, GenericNumNode z, int nodeType, int arcType, GenericIndex[] indexRange, jopt.csp.variable.CspGenericIndexRestriction sourceIdxRestriction)
          Constructor
GenericNumSummationReflexArc(java.lang.Number a, GenericNumNode z, int nodeType, int arcType, GenericIndex[] indexRange, jopt.csp.variable.CspGenericIndexRestriction sourceIdxRestriction)
          Constructor
 
Method Summary
 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
 
Methods inherited from class jopt.csp.spi.arcalgorithm.graph.arc.generic.GenericArc
getArcType, getComplexity, getSourceDependencies, getSourceNodes, getTargetNodes
 
Methods inherited from class jopt.csp.spi.arcalgorithm.graph.arc.AbstractArc
setAlgorithmStrength, setUseDomainDeltas
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jopt.csp.spi.arcalgorithm.graph.arc.Arc
getArcType, getComplexity, setAlgorithmStrength, setUseDomainDeltas
 

Constructor Detail

GenericNumSummationReflexArc

public GenericNumSummationReflexArc(Node a,
                                    GenericNumNode z,
                                    int nodeType,
                                    int arcType,
                                    GenericIndex[] indexRange,
                                    jopt.csp.variable.CspGenericIndexRestriction sourceIdxRestriction)
Constructor

Parameters:
a - A variable in equation
z - Z variable in equation
nodeType - Node variable type (Integer, Long, Float, Decimal)
arcType - Arc relation type (Eq, Lt, Gt, etc.)
indexRange - Array of indices that summation is over
sourceIdxRestriction - Optional restriction of values placed on source index ranges

GenericNumSummationReflexArc

public GenericNumSummationReflexArc(java.lang.Number a,
                                    GenericNumNode z,
                                    int nodeType,
                                    int arcType,
                                    GenericIndex[] indexRange,
                                    jopt.csp.variable.CspGenericIndexRestriction sourceIdxRestriction)
Constructor

Parameters:
a - A variable in equation
z - Z variable in equation
nodeType - Node variable type (Integer, Long, Float, Decimal)
arcType - Arc relation type (Eq, Lt, Gt, etc.)
indexRange - Array of indices that summation is over
sourceIdxRestriction - Optional restriction of values placed on source index ranges

GenericNumSummationReflexArc

public GenericNumSummationReflexArc(GenericNumConstant a,
                                    GenericNumNode z,
                                    int nodeType,
                                    int arcType,
                                    GenericIndex[] indexRange,
                                    jopt.csp.variable.CspGenericIndexRestriction sourceIdxRestriction)
Constructor

Parameters:
a - A variable in equation
z - Z variable in equation
nodeType - Node variable type (Integer, Long, Float, Decimal)
arcType - Arc relation type (Eq, Lt, Gt, etc.)
indexRange - Array of indices that summation is over
sourceIdxRestriction - Optional restriction of values placed on source index ranges
Method Detail

propagate

public 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 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