Convert Format of a Semigroup Object

Share:

Description

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

Usage

1
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

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.

Value

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

Note

In case that the input data is in 'symbolic' form, then labels is ignored, and a ‘Warning’ message is printed in the output.

Author(s)

Antonio Rivero Ostoic

See Also

semigroup, as.semigroup, relabel

Examples

1
2
3
4
5
6
7
8
## 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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.