public function simplify(ExpressionNode $node)
    {
        switch($node->getOperator()) {
            case '+': return $this->addition($node->getLeft(), $node->getRight());
            case '-': return $this->subtraction($node->getLeft(), $node->getRight());
            case '*': return $this->multiplication($node->getLeft(), $node->getRight());
            case '/': return $this->division($node->getLeft(), $node->getRight());
            case '^': return $this->exponentiation($node->getLeft(), $node->getRight());
        }
    }
public function simplify(ExpressionNode $node)
    {
        switch($node->getOperator()) {
            case '+': return $this->addition($node->getLeft(), $node->getRight());
            case '-': return $this->subtraction($node->getLeft(), $node->getRight());
            case '*': return $this->multiplication($node->getLeft(), $node->getRight());
            case '/': return $this->division($node->getLeft(), $node->getRight());
            case '^': return $this->exponentiation($node->getLeft(), $node->getRight());
        }
    }
public function simplify ( ExpressionNode $ node ) { switch ( $ node -> getOperator ( ) ) { case '+' : return $ this -> addition ( $ node -> getLeft ( ) , $ node -> getRight ( ) ) ; case '-' : return $ this -> subtraction ( $ node -> getLeft ( ) , $ node -> getRight ( ) ) ; case '*' : return $ this -> multiplication ( $ node -> getLeft ( ) , $ node -> getRight ( ) ) ; case '/' : return $ this -> division ( $ node -> getLeft ( ) , $ node -> getRight ( ) ) ; case '^' : return $ this -> exponentiation ( $ node -> getLeft ( ) , $ node -> getRight ( ) ) ; } }
Simplify the given ExpressionNode, using the appropriate factory.

@param ExpressionNode $node
@retval Node Simplified version of the input
Simplify the given ExpressionNode using the appropriate factory .