-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added networkx representation to DAG class
- Loading branch information
1 parent
638b792
commit 7679c6c
Showing
2 changed files
with
11 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
from .graph import Graph | ||
from networkx import DiGraph | ||
|
||
|
||
class DirectedAcyclicGraph(Graph): | ||
def __init__(self): | ||
super().__init__() | ||
self._networkx_graph = DiGraph() | ||
|
||
def add_edge(self): | ||
pass | ||
def __getattr__(self, item): | ||
return getattr(self._networkx_graph, item) | ||
|
||
def remove_edge(self): | ||
pass | ||
def __setattr__(self, key, value): | ||
setattr(self._networkx_graph, key, value) | ||
|
||
def get_parents(self): | ||
pass | ||
def __delattr__(self, item): | ||
delattr(self._networkx_graph, item) | ||
|
||
def get_children(self): | ||
pass | ||
|
||
def get_edges(self): | ||
pass | ||
|
||
def get_nodes(self): | ||
pass | ||
@property | ||
def networkx_graph(self): | ||
return self._networkx_graph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters