tests/testthat/test.hypervolume.R

context("hypervolume")

test_that("Check hypervolume function working properly", {
  skip_if_missing_module()
  point <- matrix(c(0,0,0),nrow=3)
  reference <- (c(1,1,1))
  expect_equal( GetHypervolume(point,reference), 1)

  point <- matrix(c(0,0,1,1,0,0,0,1,0),nrow=3)
  reference <- (c(1.1,1.1,1.1))
  expect_equal( GetHypervolume(point,reference), 0.331)
})

Try the MaOEA package in your browser

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

MaOEA documentation built on Aug. 31, 2020, 5:07 p.m.