Class ArExpression.IntPrimitive

    • Constructor Detail

      • IntPrimitive

        public IntPrimitive​(int value,
                            Model model)
    • Method Detail

      • getModel

        public Model getModel()
        Description copied from interface: ArExpression
        Return the associated model
        Specified by:
        getModel in interface ArExpression
        Returns:
        a Model object
      • intVar

        public IntVar intVar()
        Specified by:
        intVar in interface ArExpression
        Returns:
        the arithmetic expression as an IntVar. If necessary, it creates intermediary variable and posts intermediary constraints
      • isExpressionLeaf

        public boolean isExpressionLeaf()
        Specified by:
        isExpressionLeaf in interface ArExpression
        Returns:
        true if this expression is a leaf, ie a variable, false otherwise
      • extractVar

        public void extractVar​(HashSet<IntVar> variables)
        Description copied from interface: ArExpression
        Extract the variables from this expression
        Specified by:
        extractVar in interface ArExpression
        Parameters:
        variables - set of variables
      • ieval

        public int ieval​(int[] values,
                         Map<IntVar,​Integer> map)
        Specified by:
        ieval in interface ArExpression
        Parameters:
        values - int values to evaluate
        map - mapping between variables of the topmost expression and position in values
        Returns:
        an evaluation of this expression with a tuple