https://github.com/kit-parco/networkit
Tip revision: 188552ef4bc777ee8f96026948f346549761925c authored by maxv on 12 November 2015, 16:07:54 UTC
added missing init.py for the profiling module
added missing init.py for the profiling module
Tip revision: 188552e
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