| as.semigroup | R Documentation |
A generic function for coercing an R object to a semigroup class.
as.semigroup(x, gens = NA, lbs, numerical, edgeT)
x |
an array representing the semigroup |
gens |
array 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 ‘ |
Because some of the routines in the multiplex package require an object of the ‘Semigroup’ class,
this function produces this class object from an array representing the semigroup structure.
An object of the ‘Semigroup’ class
ord |
a number with the dimension of the semigroup |
st |
the strings, i.e. a vector of the unique relations |
gens |
the semigroup generators |
S |
the multiplication table of the semigroup |
Antonio Rivero Ostoic
semigroup, green.rel
# create 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 's'
attr(s, "dimnames") <- list(1:3, 1:3)
# make a semigroup object
as.semigroup(s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.