get_postfix_rule | R Documentation |
Changes a logical expression in infix notation to postfix notation using the shunting-yard algorithm.
get_postfix_rule(rule, num_eqs)
rule |
A string containing positive integers, parentheses, and |
num_eqs |
An integer, must be larger than or equal to the largest integer appearing in |
Applied to domain$rule
if domain$type == "polynomial"
, and internally calls beautify_rule()
.
rule
in postfix notation.
get_postfix_rule("1 & 2 && 3", 3)
get_postfix_rule("1 & (2 || 3)", 3)
get_postfix_rule("(1 & 2) || 3 | (4 & (5 || 6) && 7) | 8 | (9 && (10 || 11 | 12) & 13)", 13)
## Not run:
get_postfix_rule("1 && 2 & 3 && 4", 3) # Error, ineq number 4 appearing in \code{rule}.
## End(Not run)
## Not run:
# Error, ambigious rule. Change to either \code{"1 & (2 | 3)"} or \code{"(1 & 2) | 3"}.
get_postfix_rule("1 & 2 | 3", 3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.