| as.semigroup | R Documentation |
A generic function for coercing a relational system into a “Semigroup” class object.
as.semigroup(x, gens, lbs, numerical, edgeT)
x |
An array representing the semigroup. |
gens |
Aarray or vector representing the semigroup generators. |
lbs |
(optional) Label strings for the semigroup. |
numerical |
(optional and logical) Should the semigroup have numerical format? |
edgeT |
(optional and logical) Is the input in ‘ |
Use this function to convert an array representing a semigroup structure into an R object of class “Semigroup”
as some routines in multiplex require.
A list object of class “Semigroup” that is either ‘symbolic’ or ‘numerical’.
ord |
an integer with the dimension of the semigroup |
st |
a vector of the semigroup unique relations or the string-relations |
gens |
a vector with the generators of the semigroup |
S |
multiplication table with the semigroup structure. |
Class attribute, and a warning message when no generators are provided.
semigroup, green.rel
# create a labeled multiplication table data
s <- matrix(data=c(1, 1, 1, 3, 3, 3, 3, 3, 3), nrow=3, ncol=3, byrow=TRUE)
# set attributes to object
attr(s, "dimnames") <- list(1:3, 1:3)
# make 's' a semigroup object
as.semigroup(s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.