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)
| 172 | |
| 173 | class 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""" |