tests/testthat/test-sample_hypersphere.R

library(testthat)
test_that("Random Generation from PKBD works", {
   
   #------------------------------------------------------
   ## Generating data point on the Sphere
   ## and computing the densities
   size <- 100
   d <- 3
   x_sp <- sample_hypersphere(d, size)
   
   expect_equal(dim(x_sp),c(size,d))
   expect_true(any(rowSums(x_sp^2) == 1))
})

Try the QuadratiK package in your browser

Any scripts or data that you put into this service are public.

QuadratiK documentation built on Oct. 29, 2024, 5:08 p.m.