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)
})
stla/syt documentation built on July 24, 2024, 4:37 a.m.