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

Public Member Functions

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

 neighbors
 
 visited
 
 id
 
 index
 
 name
 

Detailed Description

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.

Member Function Documentation

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: