dagDensity: Density of a Directed Acyclic Graph (DAG)

Description Usage Arguments Value Examples

View source: R/indices.R

Description

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?

Usage

1

Arguments

g

an igraph object; a directed acycic graph, with is_dag=TRUE.

Value

a numeric between 0 and 1.

Examples

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)

MiloMonnier/supplynet documentation built on Feb. 16, 2021, 8:03 p.m.