The curvature of an expression.
curvature(object)
A string indicating the curvature of the expression, either "CONSTANT", "AFFINE", "CONVEX, "CONCAVE", or "UNKNOWN".
# NOT RUN {
x <- Variable()
c <- Constant(5)
curvature(c)
curvature(x)
curvature(x^2)
curvature(sqrt(x))
curvature(log(x^3) + sqrt(x))
# }
Run the code above in your browser using DataLab