orbit: Orbits of integers

orbitR Documentation

Orbits of integers

Description

Finds the orbit of a given integer

Usage

orbit_single(c1,n1)
orbit(cyc,n)

Arguments

c1,n1

In (low-level) function orbit_single(), a cyclist and an integer vector respectively

cyc,n

In (vectorized) function orbit(), cyc is coerced to a cycle, and n is an integer vector

Value

Given a cyclist c1 and integer n1, function orbit_single() returns the single cycle containing integer n1. This is a low-level function, not intended for the end-user.

Function orbit() is the vectorized equivalent of orbit_single(). Vectorization is inherited from cbind().

Author(s)

Robin K. S. Hankin

See Also

fixed

Examples


orbit(as.cycle("(123)"),1:5)
orbit(as.cycle(c("(12)","(123)(45)","(2345)")),1)
orbit(as.cycle(c("(12)","(123)(45)","(2345)")),1:3)

data(megaminx)
orbit(megaminx,13)


permutations documentation built on March 7, 2023, 8:26 p.m.