all_toposorts {toporanga}R Documentation

Extract all possible toposorts of a graph

Description

Some toporanga graphs can be topologically sorted in many ways, but arrange will generate only one, random order. This function allows to list all of them. Use sample_toposort to fairly sample a single toposort.

Usage

all_toposorts(x, ..., limit = Inf)

Arguments

x

a toporanga_graph object.

...

ignored.

limit

maximal number of permutations returned; function errors when exhausted.

Value

A list of possible orderings, in a form of vectors of agent IDs.


[Package toporanga version 1.0.0 Index]