tests/testthat/test-minij.R

context("minij matrices")

# SPD minij matrix ---------------------------------------------------------

test_that("SPD minij matrix", {
  A <- minij(10)

  for(i in 1:nrow(A)){
    for(j in i:nrow(A)){
      expect_equal(A[i,j], i)
      expect_equal(A[j,i], i)
    }
  }
})

Try the gallery package in your browser

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

gallery documentation built on Sept. 26, 2024, 5:07 p.m.