Quantum Fog  0.9.3
Public Member Functions | Public Attributes | List of all members
PBNT.Node.DirectedNode Class Reference
Inheritance diagram for PBNT.Node.DirectedNode:
Inheritance graph
[legend]
Collaboration diagram for PBNT.Node.DirectedNode:
Collaboration graph
[legend]

Public Member Functions

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)
 
- Public Member Functions inherited from PBNT.Node.Node
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)
 

Public Attributes

 parents
 
 children
 
 neighbors
 
- Public Attributes inherited from PBNT.Node.Node
 neighbors
 
 visited
 
 id
 
 index
 
 name
 

Detailed Description

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).

Member Function Documentation

def PBNT.Node.DirectedNode.undirect (   self)
This drops the direction of self's edges.  This doesn't exactly destroy it since self still maintains lists of parents and children.  We could think of this as allowing us to treat self as both directed and undirected simply allowing it to be casted as one at one moment and the other at another moment.

The documentation for this class was generated from the following file: