|
def | __init__ (self, id, index=-1, name="anonymous") |
|
def | add_parent (self, parent) |
|
def | add_child (self, child) |
|
def | remove_parent (self, parent) |
|
def | remove_child (self, child) |
|
def | undirect (self) |
|
def | __init__ (self, id, index=-1, name="anonymous") |
|
def | __lt__ (self, other) |
|
def | __hash__ (self) |
|
def | __eq__ (self, right) |
|
def | add_neighbor (self, node) |
|
def | remove_neighbor (self, node) |
|
def | is_neighbor (self, node) |
|
This is the child class of Node. Instead of mainting a list of neighbors, it maintains a list of parents and children. Of course since it is the child of Node, it does technically have a list of neighbors (though it should remain empty).