permuteVariables {ratioOfQsprays}R Documentation

Permute variables

Description

Permute the variables of a ratioOfQsprays fraction of polynomials.

Usage

## S4 method for signature 'ratioOfQsprays,numeric'
permuteVariables(x, permutation)

Arguments

x

a ratioOfQsprays object

permutation

a permutation

Value

A ratioOfQsprays object.

Examples

library(ratioOfQsprays)
f <- function(x, y, z) {
  (x^2 + 5*y + z - 1) / (x + 1)
}
x <- qlone(1)
y <- qlone(2)
z <- qlone(3)
R <- f(x, y, z)
permutation <- c(3, 1, 2)
S <- permuteVariables(R, permutation)
S == f(z, x, y) # should be TRUE

[Package ratioOfQsprays version 1.1.0 Index]