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 May 29, 2024, 2:21 a.m.