lecount {lecount}R Documentation

Counting linear extensions of partially ordered sets.

Description

lecount counts linear extensions of partially ordered sets (posets). It includes a collection of algorithms, which are documented in the paper Counting linear extensions of sparse posets (IJCAI'16).

Usage

lecount(m)

Arguments

m

logical or integer square matrix. Each poset is represented as a 0-1 matrix, where a 1 at [i,j] indicates i < j. Any value other than 0 or FALSE is treated as 1 in this context.

Details

This R package is a wrapper of LEcount 16.04.20 C++ code by Kustaa Kangas.

Value

Resulting count.

Author(s)

Kustaa Kangas

Examples

m = matrix(c(
0,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,1,0,
0,1,0,0,0,1,1,0,0,0,
0,0,0,0,0,1,0,0,0,0,
0,1,0,1,0,1,0,0,1,0,
1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
1,1,1,1,0,0,1,0,0,0
),10,,TRUE)
lecount(m)

[Package lecount version 0.1-0 Index]