Determine whether a composition is non-decreasing or non-increasing in an index.

is_incr(object, idx)

is_decr(object, idx)

# S4 method for class 'Atom'
is_incr(object, idx)

# S4 method for class 'Atom'
is_decr(object, idx)

Arguments

object

A Atom object.

idx

An index into the atom.

Value

A logical value.

Examples

x <- Variable()
is_incr(log(x), 1)
#> [1] TRUE
is_incr(x^2, 1)
#> [1] FALSE
is_decr(min(x), 1)
#> [1] TRUE
is_decr(abs(x), 1)
#> [1] FALSE