MCPcopy Create free account
hub / github.com/ddbourgin/numpy-ml / __init__

Method __init__

numpy_ml/utils/graphs.py:174–187  ·  view source on GitHub ↗

A generic directed graph object. Parameters ---------- V : list A list of vertex IDs. E : list of :class:`Edge ` objects A list of directed edges connecting pairs of vertices in ``V``.

(self, V, E)

Source from the content-addressed store, hash-verified

172
173class DiGraph(Graph):
174 def __init__(self, V, E):
175 """
176 A generic directed graph object.
177
178 Parameters
179 ----------
180 V : list
181 A list of vertex IDs.
182 E : list of :class:`Edge <numpy_ml.utils.graphs.Edge>` objects
183 A list of directed edges connecting pairs of vertices in ``V``.
184 """
185 super().__init__(V, E)
186 self.is_directed = True
187 self._topological_ordering = []
188
189 def _build_adjacency_list(self):
190 """Encode directed graph as an adjancency list"""

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected