tests/testthat/test-RS.R

context("RS correspondence")

test_that("RS of inverse", {
  sigma <- c(1, 3, 6, 4, 7, 5, 2)
  PQ <- RS(sigma)
  QP <- RS(order(sigma))
  expect_identical(PQ$P, QP$Q)
  expect_identical(PQ$Q, QP$P)
})

Try the syt package in your browser

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

syt documentation built on Sept. 11, 2024, 5:28 p.m.