tests/testthat/test-tridiagonalA.R

context("Equality of algorithms for tridiagonal likelihood matrix")

test_that("Ryser and brute algorithms produce the same output", {
  expect_equal( max(abs(ryser(triA)-brute(triA)))<1e-10,TRUE )
})

test_that("Ryser and BG algorithms produce the same output", {
  expect_equal( max(abs(ryser(triA)-BG(triA)))<1e-10,TRUE )
})

Try the expperm package in your browser

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

expperm documentation built on May 29, 2019, 1:02 a.m.