Bases: object
Create a DGSStreamParser, handling graph streams encoded in DGS-based files. For documentation about DGS, see: https://graphstream-project.org/doc/Advanced-Concepts/The-DGS-File-Format/
path (str) – Filename including path for DGS-file.
mapped (bool, optional) – Indicates whether file includes mapping. Default: True
baseIndex (int, optional) – Indicates whether a fixed base index should be set. Default: 0
Returns a list of graph events (networkit.GraphEvent).
A list of graph events.
Bases: object
Creates a DGS writer object.
Stores a graph event stream in a file (DGS format).
stream (list(networkit.dynamics.GraphEvent)) – A list of graph events.
path (str) – File to write the stream to.
Bases: Algorithm
Calculate the edge difference between two graphs.
This calculates which graph edge additions or edge removals are necessary to transform one given graph into another given graph.
Both graphs need to have the same node set, directed graphs are not supported currently.
Note that edge weight differences are not detected but edge addition events set the correct edge weight.
G1 (networkit.Graph) – The first graph to compare
G2 (networkit.Graph) – The second graph to compare
Get the required edits.
A list of graph events.
Get the required number of edge additions.
The number of edge additions.
int
Get the required number of edge removals.
The number of edge removals.
int
Get the required number of edge weight updates.
The number of edge weight updates.
int
Get the required number of edits.
The number of edits.
int
Get the required number of node additions.
The number of node additions.
int
Get the required number of node removals.
The number of node removals.
int
Get the required number of node restorations.
The number of node restorations.
int
Bases: object
Representation of a graph event.
Parameter type
is one of the following:
networkit.dynamics.GraphEventType.NODE_ADDITION
networkit.dynamics.GraphEventType.NODE_REMOVAL
networkit.dynamics.GraphEventType.NODE_RESTORATION
networkit.dynamics.GraphEventType.EDGE_ADDITION
networkit.dynamics.GraphEventType.EDGE_REMOVAL
networkit.dynamics.GraphEventType.EDGE_WEIGHT_UPDATE
networkit.dynamics.GraphEventType.EDGE_WEIGHT_INCREMENT
networkit.dynamics.GraphEventType.TIME_STEP
type (networkit.dynamics.GraphEvent) – Type of graph event.
u (int) – Node u involved in graph event.
v (int) – Node v involved in graph event.
w (int, float) – Weight of edge between node u and v.
Property of networkit.dynamics.GraphEvent
Type of graph event.
Property of networkit.dynamics.GraphEvent
Node u involved in graph event.
Property of networkit.dynamics.GraphEvent
Node v involved in graph event.
Property of networkit.dynamics.GraphEvent
Edgeweight w involved in graph event.
Bases: object
Updates a graph according to a stream of graph events.
G (networkit.Graph) – Initial graph
Update the underlying graph based on an input stream.
stream (list(networkit.dynamics.GraphEvent)) – A list of graph events.
Convenience function for creating a new graph from a stream of graph events
stream (list(networkit.dynamics.GraphEvent)) – Event stream
weighted (bool) – Produce a weighted or unweighted graph
directed (bool) – Produce a directed or undirected graph