# Exponential law (log-concave)
PoincareConstant(dexp,qexp,rate=1)
# Weibull law (non log-concave)
PoincareConstant(dweibull,cdfct=pweibull, logconcave=FALSE,
optimize.interval=c(0, 15), shape=1, scale=1)
# Triangular law (log-concave)
library(triangle)
PoincareConstant(dtriangle, qtriangle, a=49, b=51, c=50)
# Truncated Gumbel law (log-concave)
library(evd)
PoincareConstant(dgumbel, qgumbel, pgumbel, truncated=TRUE,
min=500, max=3000, loc=1013.0, scale=558.0)
Run the code above in your browser using DataLab