Nothing
context("optimizeSubInts")
test_that("optimizeSubInts", {
f = function(x) sin(x) * x
z = optimizeSubInts(f, interval = c(0, 50), nsub = 200L)
fopt = f(pi * 3 / 2 + 14 * pi)
expect_true(abs(fopt - z$objective) < 1e-1)
# test with nsub = 1, had a bug here
f = function(x) sum(x^2)
z = optimizeSubInts(f, interval = c(-10, 10), nsub = 1)
expect_true(abs(z$minimum) < 1e-5)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.