Graph module (corneto.graph)#

Base classes#

BaseGraph([default_edge_type])

Abstract base class for graphs and hypergraphs.

Graph([default_edge_type])

Concrete graph implementation supporting directed/undirected edges and hyperedges.

EdgeType(value)

Edge type (DIRECTED, UNDIRECTED).

Random networks#

duplication_divergence_network(n[, ...])

Generate a random network using the duplication-divergence model.

preferential_attachment_network(n, m[, ...])

Generate a random network using the Barabasi-Albert preferential attachment model.