Interface ReExpression

    • Method Detail

      • getModel

        Model getModel()
        Return the associated model
        Specified by:
        getModel in interface ArExpression
        Returns:
        a Model object
      • boolVar

        BoolVar boolVar()
        Returns:
        the relational expression as an BoolVar. If necessary, it creates intermediary variable and posts intermediary constraints
      • intVar

        default 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
      • extractVar

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

        default void post()
        Post the decomposition of this expression in the solver
      • decompose

        default Constraint decompose()
        Returns:
        the topmost constraint representing the expression. If needed, a call to this method creates additional variables and posts additional constraints.
      • extension

        default Constraint extension()
        Returns:
        a TABLE constraint that captures the expression
      • beval

        default boolean beval​(int[] values,
                              Map<IntVar,​Integer> map)
        Parameters:
        values - int values to evaluate
        map - mapping between variables of the topmost expression and position in values
        Returns:
        an evaluation of this relational expression based on a tuple
      • ieval

        default 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
      • and

        default ReExpression and​(ReExpression... y)
        Parameters:
        y - some relational expressions
        Returns:
        return the expression "x ∧ y_1 ∧ y_2 ∧ ..." where this is "x"
      • or

        default ReExpression or​(ReExpression... y)
        Parameters:
        y - some relational expressions
        Returns:
        return the expression "x ∨ y_1 ∨ y_2 ∨ ..." where this is "x"
      • xor

        default ReExpression xor​(ReExpression... y)
        Parameters:
        y - a relational expression
        Returns:
        return the expression "x ⊕ y_1 ⊕ y_2 ⊕ ..." where this is "x"
      • imp

        default ReExpression imp​(ReExpression y)
        Parameters:
        y - a relational expression
        Returns:
        return the expression "x ⇒ y" where this is "x"
      • iff

        default ReExpression iff​(ReExpression... y)
        Parameters:
        y - a relational expression
        Returns:
        return the expression "x ⇔ y_1 ⇔ y_2 ⇔ ..." where this is "x"
      • not

        default ReExpression not()
        Returns:
        return the expression "¬x" where this is "x"
      • ift

        default ArExpression ift​(ArExpression y1,
                                 ArExpression y2)
        Parameters:
        y1 - an arithmetic expression
        y2 - an arithmetic expression
        Returns:
        return "if(b,y1,y2" where this is "b"
      • ift

        default ArExpression ift​(ArExpression y1,
                                 int y2)
        Parameters:
        y1 - an arithmetic expression
        y2 - an int
        Returns:
        return a arithmetic expression that is equal to y1 if b is true, y2 otherwise.
      • ift

        default ArExpression ift​(int y1,
                                 ArExpression y2)
        Parameters:
        y1 - an int
        y2 - an arithmetic expression
        Returns:
        return a arithmetic expression that is equal to y1 if b is true, y2 otherwise.
      • ift

        default ArExpression ift​(int y1,
                                 int y2)
        Parameters:
        y1 - an int
        y2 - an int
        Returns:
        return a arithmetic expression that is equal to y1 if b is true, y2 otherwise.