free

0th

Percentile

Objects of class free

Generate, and test for, objects of class free

Usage
free(x)
as.free(x)
is.free(x)
list_to_free(x)
Arguments
x

Function free() needs either a two-row matrix, or a list of two-row matrices; function as.free() attempts to coerce different types of argument before passing to free() (possibly via list_to_free())

Details

The basic structure of an element of the free group is a two-row matrix. The top row is the symbols (1=a, 2=b, 3=c, etc) and the bottom row is the corresponding power. Thus $a^2ba^{-1}$ would be

> rbind(c(1,2,1),c(2,1,-1))
[,1] [,2] [,3]
[1,]    1    2    1
[2,]    2    1   -1
>


Function free() needs either a two-row matrix or a list of two-row matrices. It is the only place in the package that sets the class of an objet to free. Function as.free() is a bit more user-friendly and tries a bit harder to do the Right Thing.

char_to_free

• free
• as.free
• is.free
• list_to_free
Examples
# NOT RUN {
free(rbind(1:5,5:1))

x <- rfree(10,4)
x
x+x
x-x
x * (0:3)

as.free(c(4,3,2,2,2))
as.free("aaaabccccaaaaa")
# }

Documentation reproduced from package freegroup, version 1.1-0, License: GPL-2

Community examples

Looks like there are no examples yet.