parse_ineq | R Documentation |
Parses an ineq expression into a list of elements that represents the ineq.
parse_ineq(s, p)
s |
A string, an ineq expression. Please refer |
p |
An integer, the dimension. |
Please refer make_domain()
for the syntax of the expression.
A list containing the following elements:
uniform |
A logical, indicates whether the ineq is a uniform expression that applies to each component independently (e.g. |
const |
A number, the constant side of the ineq that the variable side should compare to (e.g. |
larger |
A logical, indicates whether the variable side of the expression should be larger or smaller than |
power_numers |
A single number or a vector of length |
power_denoms |
A single number or a vector of length |
coeffs |
A vector of length |
p <- 30
parse_ineq("sum(x^2)>10", p)
parse_ineq("sum(x^(1/3))>10", p)
parse_ineq("x1>1", p)
parse_ineq("x2<1", p)
parse_ineq("exp(x)>1.3", p)
parse_ineq("sum(log(x)) < 2", p)
parse_ineq("x1^(2/3)-1.3x2^(-3)<1", p)
parse_ineq("exp(x1)+2.3*x2^2 > 2", p)
parse_ineq(paste(paste(sapply(1:p,
function(j){paste(j, "x", j, sep="")}), collapse="+"), "<1"), p)
parse_ineq("0.5*x1^(-2/3)-x3^3 + 2log(x2)- 1.3e4exp(-25*x6)+x8-.3x5^(-3/-4) >= 2", 8)
parse_ineq("0.5*x1^(-2/3)-x2^(4/-6)+2e3x3^(-6/9) < 3.5e5", 3)
parse_ineq("x^(-2/3)<=3e3", 5)
parse_ineq("sum(x^(-2/3))<=3e3", 5)
parse_ineq("x<=3e3", 5)
parse_ineq("sum(x)<=3e3", 5)
parse_ineq("exp(-23x)<=3e3", 5)
parse_ineq("sum(exp(-23x))<=3e3", 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.