https://github.com/kit-parco/networkit
Raw File
Tip revision: 4ae694a5d8865e58ce58a3dc2e993326d54515e9 authored by Fabian Brandt-Tumescheit on 01 March 2020, 16:11:37 UTC
Bump version to 6.1
Tip revision: 4ae694a
dynamic.py
# extension imports
from _NetworKit import Graph, GraphEvent, DGSStreamParser, GraphUpdater, APSP, GraphDifference


def graphFromStream(stream, weighted, directed):
	""" Convenience function for creating a new graph from a stream of graph events

	Parameters
	----------
	stream : list of GraphEvent
		event stream
	weighted : produce a weighted or unweighted graph
		boolean
	directed : produce a directed or undirected graph
		boolean
	"""
	G = Graph(0, weighted, directed)
	gu = GraphUpdater(G)
	gu.update(stream)
	return G
back to top