Nothing
context("Gallery matrices")
# binomial_matrix: Binomial matrix ---------------------------------------------------------
test_that("Binomial matrix", {
for(n in 10:13){
A <- binomial_matrix(n)
expect_equal(norm(A %*% A - 2^(n-1) * diag(n)), 0)
# B is involutory
B <- A*2^((1-n)/2)
expect_equal(norm(B %*% B - diag(n)), 0)
}
# Test for n = 4
A <- binomial_matrix(4)
B <- matrix(c(1,1,1,1,3,1,-1,-3,3,-1,-1,3,1,-1,1,-1), nrow=4)
expect_equal(norm(A-B),0)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.