as.semigroup: Coerce Relational System into a Semigroup Object

as.semigroupR Documentation

Coerce Relational System into a Semigroup Object

Description

A generic function for coercing an R object to a semigroup class.

Usage

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

Arguments

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

Details

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.

Value

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

Author(s)

Antonio Rivero Ostoic

See Also

semigroup, green.rel

Examples

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

multiplex documentation built on Sept. 30, 2024, 5:07 p.m.