A toy R package to teach myself the process of developing R packages. Calculate and visualize Multiple Integral using Monte Carlo method. View Demo
require(devtools)
devtools::install_github("ddlee96/mcmi")
mcimi::mcmi(bounds, integrand, constrains, n)
mcmi::visualize(boungds, constrains)
- bounds: the interval to calculate integral
- integrand: the integrand, like f(x) = x, default: 1
- constrains: the inequalities that variable should satisfy, default: 1
- n: the count of random points, default: 1,000,000
mcmi(c(0,1), "exp(x)")
mcmi(c(1,3,-1,4), "x*y+x", c("x^3+y^3<=29", "y>=exp(x)-2")
- only support up to 3D
- only support x, y, z as variables
- accuracy not satisfying