hornet.contrib.networkabstractor – Graph Abstraction
Module author: John Paulett <john.paulett -at- vanderbilt.edu>
-
class hornet.contrib.networkabstractor.AbstractAbstractionProvider
-
abstract_lookup(*args, **kw)
-
get_node_data()
- Returns an iterable in the format [node, node’s abstracted value]
-
class hornet.contrib.networkabstractor.DatabaseAbstractionProvider(db)
-
get_node_data()
-
class hornet.contrib.networkabstractor.FileAbstractionProvider(input_dir, abst_fname_fmt='attributes.csv')
-
get_node_data()
-
class hornet.contrib.networkabstractor.NetworkAbstractionPlugin(data_provider, builder_cls=<class 'hornet.contrib.networkabstractor.NetworkAbstractor'>)
Plugin that transforms from one level to another level. Returns
the provider attribute to be set to an instance of a valid
implementation of hornet.plugin.abstractor.AttributeProvider.
-
accepted_events()
-
notify(*args, **kw)
-
class hornet.contrib.networkabstractor.NetworkAbstractor(provider, original_graph)
Abstracts the graph according to the abstractor function. The abstract
replaces the nodes by the abstract values and aggregates the results (size
element) for each unique abstract node. Does not modify the input graph.
The abstractor function should take a node as input and provide some level
of abstraction based upon that node. It must return a list of ids for new
abstracted nodes (even for a single element).
-
id
-
hornet.contrib.networkabstractor.create_graph_from_edges(graph, edges_dict)