# create the data: two sets with a pair of binary relations
# among three elements
arr <- round( replace( array( runif(18), c(3 ,3, 2) ), array( runif(18),
c(3, 3, 2) ) > .5, 3 ) )
# make the signed matrix with two types of relations
# and establish the semiring structure
signed(arr) |>
semiring()
Run the code above in your browser using DataLab