Edge List

Read and write DyNetx graphs as edge lists.

The multi-line adjacency list format is useful for graphs with nodes that can be meaningfully represented as strings.

With the edgelist format simple edge data can be stored but node or graph data is not. There is no way of representing isolated nodes unless the node has a self-loop edge.

Format

You can read or write three formats of edge lists with these functions.

Node pairs with timestamp (u, v, t):

>>> 1 2 0

Sequence of Interaction events (u, v, +/-, t):

>>> 1 2 + 0
>>> 1 2 - 3

Interaction Graph

write_interactions(G, path[, delimiter, …]) Write a DyNetx graph in interaction list format.
read_interactions(path[, comments, …]) Read a DyNetx graph from interaction list format.

Snapshot Graphs

write_snapshots(G, path[, delimiter, encoding]) Write a DyNetx graph in snapshot graph list format.
read_snapshots(path[, comments, directed, …]) Read a DyNetx graph from snapshot graph list format.