Skip to content

Network Development

James Gaboardi edited this page Jul 16, 2016 · 9 revisions

This is pulled from NetworkX as an example of how they are representing a graph:

The Graph class uses a dict-of-dict-of-dict data structure.
    The outer dict (node_dict) holds adjacency lists keyed by node.
    The next dict (adjlist) represents the adjacency list and holds
    edge data keyed by neighbor.  The inner dict (edge_attr) represents
    the edge data and holds edge attribute values keyed by attribute names.
    Each of these three dicts can be replaced by a user defined
    dict-like object. In general, the dict-like features should be
    maintained but extra features can be added. To replace one of the
    dicts create a new graph class by changing the class(!) variable
    holding the factory for that dict-like structure. The variable names
    are node_dict_factory, adjlist_dict_factory and edge_attr_dict_factory.
    node_dict_factory : function, (default: dict)
        Factory function to be used to create the outer-most dict
        in the data structure that holds adjacency lists keyed by node.
        It should require no arguments and return a dict-like object.
    adjlist_dict_factory : function, (default: dict)
        Factory function to be used to create the adjacency list
        dict which holds edge data keyed by neighbor.
        It should require no arguments and return a dict-like object
    edge_attr_dict_factory : function, (default: dict)
        Factory function to be used to create the edge attribute
        dict which holds attrbute values keyed by attribute name.
        It should require no arguments and return a dict-like object.

Example pysal.Network Notebooks -- James Gaboardi

Integration of pysal.Network and Gurobi with visualizations in bokeh for AAG16

Comparing Gurobi, CPLEX, and COIN-OR solutions with cost matrices produced in pysal.Network


Clone this wiki locally