random.dag: Generate random DAGs

Description Usage Arguments Details Value

Description

Generate a random DAG with fixed number of edges.

Usage

1
random.dag(nnode, nedge, FUN = NULL, permute = TRUE)

Arguments

nnode

Number of nodes in the DAG.

nedge

Number of edges in the DAG.

FUN

Optional function to be used as a random number generator.

permute

If TRUE, order of nodes will be randomly permuted. If FALSE, output will be ordered according to its topological sort, i.e. with a lower-triangular adjacency matrix.

Details

FUN can be any function whose first argument is called n. This allows for both random and deterministic outputs.

Value

An (weighted) adjacency matrix.


itsrainingdata/sparsebnUtils documentation built on June 5, 2019, 5:43 p.m.