tests/testthat/test-isPD.R

context("Check for positive definiteness")
test_that("Positive definiteness is correctly called", {
    expect_false(isPD(matrix(c(1,2,2,1),2,2)))
    expect_true(isPD(matrix(c(1,0.5,0.5,1),2,2)))
})

Try the oosse package in your browser

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

oosse documentation built on May 29, 2024, 10:35 a.m.