networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
random_internet_as_graph(n, seed=None)

Notes

This algorithm returns an undirected graph resembling the Internet Autonomous System (AS) network, it uses the approach by Elmokashfi et al. and it grants the properties described in the related paper .

Each node models an autonomous system, with an attribute 'type' specifying its kind; tier-1 (T), mid-level (M), customer (C) or content-provider (CP). Each edge models an ADV communication link (hence, bidirectional) with attributes:

Parameters

n: integer in [1000, 10000] :

Number of graph nodes

seed : integer, random_state, or None (default)

Indicator of random number generation state. See Randomness<randomness> .

Returns

G: Networkx Graph object

A randomly generated undirected graph

Generates a random undirected graph resembling the Internet AS network

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/generators/internet_as_graphs.py#399
type: <class 'function'>
Commit: