Package graphadt :: Module graphtypes :: Class WeightedDirectedAdjListsGraph
[hide private]
[frames] | no frames]

Class WeightedDirectedAdjListsGraph

source code

       object --+        
                |        
            Graph --+    
                    |    
        WeightedGraph --+
                        |
   object --+           |
            |           |
        Graph --+       |
                |       |
    DirectedGraph --+   |
                    |   |
DirectedAdjListsGraph --+
                        |
                       WeightedDirectedAdjListsGraph

Convenience class which uses multiple inheritance to achieve weighted, Directed behaviour using an underlying Adjacency Lists Representation.

Note: this class has not been completely tested. Some faults may still exist.

Nested Classes [hide private]

Inherited from Graph: __metaclass__

Instance Methods [hide private]
 
__init__(self)
Creates a mapping dictionary of edge weights, and assigns all edges a default weight of 0
source code

Inherited from WeightedGraph: getArcWeight, getNeighbourWeights, removeVertex, setArcWeight

Inherited from WeightedGraph (private): _removeArc

Inherited from DirectedGraph: addArc, defaultConnector, inDegree, isArc, removeArc, size

Inherited from Graph: __repr__, addEdge, addVertices, degree, isEdge, neighbors, neighbours, order, removeEdge

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from WeightedGraph: copy

Inherited from Graph: read

Class Variables [hide private]
  __abstractmethods__ = frozenset([])
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Creates a mapping dictionary of edge weights, and assigns all edges a default weight of 0

Note: You MUST call the other Graph class's constructor _before_ calling this one.

Parameters:
  • representation - the state of the graph to be copied
Overrides: object.__init__
(inherited documentation)