ExpressionNegationCommutative

com.phasmidsoftware.number.expression.expr.ExpressionNegationCommutative

Extractor object for handling negation expressions in a commutative manner. Matches pairs of expressions where one is an Expression and the other is a negated ValueExpression(-1).

This object extends the CommutativeExtractor to allow the extraction of operands in any order (i.e., it supports both (A, B) and (B, A) configurations).

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Inherited methods

def unapply(pair: (Expression, Expression)): Option[(Expression, Expression)]

Unapply method that tries both orderings on a tuple. First tries (extractLeft(left), extractRight(right)), then tries (extractLeft(right), extractRight(left)).

Unapply method that tries both orderings on a tuple. First tries (extractLeft(left), extractRight(right)), then tries (extractLeft(right), extractRight(left)).

Attributes

Inherited from:
CommutativeExtractor