Learn R Programming

multiplex (version 2.5)

convert: Convert Format of a Semigroup Object

Description

A function to convert an object representing a semigroup of relations from Numerical to Symbolic format and vice versa.

Usage

convert(x, labels = NULL, SemigroupClass = FALSE)

Arguments

x
an object from the `Semigroup' class.
labels
(optional) the labels to be used in the conversion
SemigroupClass
(logical) whether the output should be a `Semigroup' class

Value

An array representing the semigroup of relations or an object of the `Semigroup' class.

Details

In order to avoid the construction of the semigroup from primitive relations (since it might take a relative long time), this function is aimed to convert the semigroup structure in a fast way from a numerical to a symbolic form or vice versa.

See Also

semigroup, as.semigroup, relabel

Examples

Run this code
## Create the multiplication table
s <- matrix(data=c(1, 1, 1, 3, 3, 3, 3, 3, 3), nrow=3, ncol=3, byrow=TRUE)

## make a semigroup object with labels
S <- as.semigroup(s, labels=c('n', 'm', '<f1>'))

## convert the semigroup to a symbolic form
convert(S)

Run the code above in your browser using DataLab