tests/qgram.R

 set.seed(42)

 library(rcdd)

 d <- 10
 n <- 5
 foo <- matrix(rnorm(d * n), d)

 bar <- qgram(foo)

 baz <- qmatmult(t(bar), bar)
 all(baz[row(baz) != col(baz)] == "0")

 all(apply(qabs(bar), 2, qsum) == "1")

Try the rcdd package in your browser

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

rcdd documentation built on April 25, 2023, 1:09 a.m.