check_interpolconcave: check_interpolconcave

Description Usage Arguments Value Examples

View source: R/utils.R

Description

given a (sorted) set of points, check if the interpolating function is concave he function will loop through all points in x and calculate the interpolated value

Usage

1

Arguments

x

x points

f

represent f(x)

Value

a boolean TRUE or FALSE. A TRUE means the function is concave

Examples

1
2
3
4
log_f <- function(x) log(dnorm(x))
x <- seq(-3, 3, by=1)
y <- log_f(x)
check_interpolconcave(x, y)

andrea2910/ars documentation built on June 17, 2021, 3:32 a.m.