as.semigroup: Coerce into a Semigroup Object

as.semigroupR Documentation

Coerce into a Semigroup Object

Description

A generic function for coercing a relational system into a “Semigroup” class object.

Usage

as.semigroup(x, gens, lbs, numerical, edgeT)

Arguments

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 ‘x’ an edge table?

Details

Use this function to convert an array representing a semigroup structure into an R object of class “Semigroup” as some routines in multiplex require.

Value

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.

See Also

semigroup, green.rel

Examples

# 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)

multiplex documentation built on July 30, 2026, 5:13 p.m.