tests/testthat/test_helper.R

test_that("is_dominated identifies dominated points", {
  # columns are points: (1, 1) dominates (2, 2)
  ymat = matrix(c(1, 1, 2, 2), nrow = 2)
  expect_equal(is_dominated(ymat), c(FALSE, TRUE))
})

test_that("is_dominated keeps tied (weakly dominated) points as non-dominated", {
  # two identical non-dominated points must both be reported as non-dominated
  ymat = matrix(c(1, 1, 1, 1, 2, 2), nrow = 2)
  expect_equal(is_dominated(ymat), c(FALSE, FALSE, TRUE))
})

Try the bbotk package in your browser

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

bbotk documentation built on July 17, 2026, 5:07 p.m.