|
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) |
|
|
| neighbors |
|
| visited |
|
| id |
|
| index |
|
| name |
|
A Node is the basic element of a graph. In its most basic form a graph is just a list of nodes. A Node is a really just a list of neighbors.
def PBNT.Node.Node.add_neighbor |
( |
|
self, |
|
|
|
node |
|
) |
| |
Make node a neighbor if it is not alreadly. This is a hack, we should be allowing self to be a neighbor of self in some graphs. This should be enforced at the level of a graph, because that is where the type of the graph would disallow it.
The documentation for this class was generated from the following file: