https://github.com/kit-parco/networkit
Raw File
Tip revision: 1606ccb51dfeb42a73319004c8e9414721314f28 authored by Gerd Lindner on 19 August 2015, 14:37:42 UTC
Closing sparsification branch.
Tip revision: 1606ccb
dynamic.py
# extension imports
from _NetworKit import Graph, GraphEvent, DGSStreamParser, GraphUpdater, APSP


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