Negation (cpmpy.transformations.negation)
Transformations dealing with negations.
- cpmpy.transformations.negation.negated_normal(expr)[source]
Deprecated since version 0.9.16: Please use
recurse_negation()instead.
- cpmpy.transformations.negation.push_down_negation(lst_of_expr, toplevel=True)[source]
Transformation that checks all elements from the list, and pushes down any negation it finds with the
recurse_negation()function.Assumes the input is a list (typically from
toplevel_list()) en ensures the output is a toplevel_list if the input was.
- cpmpy.transformations.negation.recurse_negation(expr)[source]
Negate ‘expr’ by pushing the negation down into it and its args
Comparison: swap comparison sign
Operator.is_bool(): apply DeMorgan Global: leave “NOT” operator before global constraint. Usecpmpy.transformations.decompose_global.decompose_in_tree()for this (AFTER ISSUE #293)