Module org.maxicp

Interface Expression

All Superinterfaces:
Serializable
All Known Subinterfaces:
BoolExpression, BoolVar, ConcreteBoolVar, ConcreteIntervalVar, ConcreteIntVar, ConcreteSeqVar, CPBoolVar, CPIntervalVar, CPIntVar, CPSeqVar, IntervalExpression, IntervalVar, IntExpression, IntVar, NonLeafExpressionNode, SeqExpression, SeqVar, SymbolicBoolExpression, SymbolicBoolVar, SymbolicIntervalVar, SymbolicIntExpression, SymbolicIntVar, SymbolicSeqVar
All Known Implementing Classes:
Abs, And, BoolVarImpl, Constant, CPBoolVarImpl, CPBoolVarIsEqual, CPIntervalVarImpl, CPIntervalVarOffset, CPIntVarConstant, CPIntVarImpl, CPIntVarViewMul, CPIntVarViewOffset, CPIntVarViewOpposite, CPSeqVarImpl, CPSeqVarViewFlip, CstMul, CstOffset, Element1D, Element1DVar, Element2D, Element2DVar, EndAfter, EndBefore, EndBeforeStart, Eq, GreaterOrEq, InSet, IntervalEnd, IntervalEndOrValue, IntervalLength, IntervalLengthOrValue, IntervalStart, IntervalStartOrValue, IntervalStatus, IntervalVarImpl, IntVarRangeImpl, IntVarSetImpl, IsNodeRequired, LessOrEq, Max, Min, Mul, MulBinary, Not, NotEq, Or, Present, SeqVarImpl, StartAfter, StartBefore, Sum, UnaryMinus, WeightedSum

public interface Expression extends Serializable
An expression, that can be integer, boolean, or a sequence
  • Method Details

    • computeSubexpressions

      Collection<? extends Expression> computeSubexpressions()
      Should be implemented by all subclasses, but not used directly. Use subexpressions() instead, which is a cached version of this. Returns a collection that contains all sub-expressions of this expression. It should not be modified. In practice, it should actually be unmutable or a copy.
    • subexpressions

      default Collection<? extends Expression> subexpressions()
      Returns a collection that contains all sub-expressions of this expression. It should not be modified. In practice, it should actually be unmutable or a copy. Cached counterpart of computeSubexpressions().
    • mapSubexpressions

      Expression mapSubexpressions(Function<Expression,Expression> f)
      Apply a function on all sub-expressions of this expression and returns a new expression of the same type. This function should return a value that is of the same class as the object that was given to it.
    • isFixed

      boolean isFixed()
      True if the expression is fixed
    • getModelProxy

      ModelProxy getModelProxy()
      Returns the ModelDispatcher linked to this Expression