Description Usage Arguments Value Examples
A Directed Acyclic Graph (DAG) is a hierarchical structure of 3 levels of vertices: the source set, the intermediaries set and the targets set. Given that edges outgoing from targets and incoming to sources cannot exist, this metric compute a relevant graph density for DAGs?
1 | dagDensity(g)
|
g |
an igraph object; a directed acycic graph, with is_dag=TRUE. |
a numeric between 0 and 1.
1 2 3 4 5 6 | library(igraph)
g = make_tree(10)
edge_density(g)
edge_density(as.undirected(g))
is_dag(g)
dagDensity(g)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.