/usr/lib/python3/dist-packages/networkx/classes/ordered.py is in python3-networkx 1.11-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | """
OrderedDict variants of the default base classes.
"""
from collections import OrderedDict
from .graph import Graph
from .multigraph import MultiGraph
from .digraph import DiGraph
from .multidigraph import MultiDiGraph
__all__ = []
__all__.extend([
'OrderedGraph',
'OrderedDiGraph',
'OrderedMultiGraph',
'OrderedMultiDiGraph',
])
class OrderedGraph(Graph):
node_dict_factory = OrderedDict
adjlist_dict_factory = OrderedDict
edge_attr_dict_factory = OrderedDict
class OrderedDiGraph(DiGraph):
node_dict_factory = OrderedDict
adjlist_dict_factory = OrderedDict
edge_attr_dict_factory = OrderedDict
class OrderedMultiGraph(MultiGraph):
node_dict_factory = OrderedDict
adjlist_dict_factory = OrderedDict
edge_key_dict_factory = OrderedDict
edge_attr_dict_factory = OrderedDict
class OrderedMultiDiGraph(MultiDiGraph):
node_dict_factory = OrderedDict
adjlist_dict_factory = OrderedDict
edge_key_dict_factory = OrderedDict
edge_attr_dict_factory = OrderedDict
|