Operators are built to be nested through the add method.
Binarize Operator
Binarize Operator
It can only take one argument and return 1.0 if the expression is > 0 returns 0.0 otherwise
Created by Angelo Leto on 19/10/2018.
Created by mal on 21/02/2017.
Not Operator
Not Operator
It can only take one argument --we leave List instead of Set as argument so that Parser.gobble_command can add one Expression. Still, we throw exception if more than one child is added
Created by mal on 21/02/2017.
Created by mal on 21/02/2017.
Created by mal on 21/02/2017.
Created by mal on 21/02/2017.
Compare Operator
Compare Operator
It compare the result of two Expressions
Created by Angelo Leto on 19/10/2018.
Compare Operator
Compare Operator
It compare the result of two Expressions
Created by Angelo Leto on 19/10/2018.
Compare Operator
Compare Operator
It compare the result of two Expressions
Created by Angelo Leto on 19/10/2018.
Compare Operator
Compare Operator
It compare the result of two Expressions
Created by Angelo Leto on 19/10/2018.
Compare Operator
Compare Operator
It compare the result of two Expressions
Created by Angelo Leto on 19/10/2018.
Created by angelo on 21/06/17.
Created by Angelo Leto <[email protected]> on 03/03/17.
Created by angelo on 18/01/2018.
Operators are built to be nested through the add method.
For instance the operator:
operator1(operator2(atomic1("..."), atomic2("...")), operator3(atomic3("...")))
The parser would build the final operator with:
disjunction.add(operator1, 0) .add(operator2, 1) .add(atomic1, 2) .add(atomic2, 2) .add(operator3, 1) .add(atomic3, 2)
(Where disjunction is put as starting point because disjunction(one_expression) == one_expression)
This works because add always add the new Expression as head, and when we always add on the head. When add(atomic1, 2) is called, atomic1 is added as head of the children in operator2, which was just added as head of the children of op1, which was added as the head of disjunction.
Created by [email protected] on 21/02/2017.