Provides a subgraph, i.e., a subset of the vertices and edges
of a specified graph Vertices are specified via ids from its supergraph and edges via
(tail,head)tuples
It also keeps track of the subgraphs total weight (= sum of edge
weights) for weights with weightID == 0
Methods




AddEdge

AddEdge (
self,
tail,
head,
)
Add an edge from the supergraph to the subgraph.
Will also add tail and/or head if there are not
already in subgraph


AddSubGraph

AddSubGraph ( self, G )
Add subgraph G to self. Will do nothing if self and G
have distinct supergraphs


AddVertex

AddVertex ( self, v )
Add a vertex from the supergraph to the subgraph.
Returns NoSuchVertexError if v does not exist in
supergraph


Clear

Clear ( self )
Delete all vertices and edges from the subgraph.


DeleteEdge

DeleteEdge (
self,
tail,
head,
)
Delete edge from subgraph. Raises NoSuchEdgeError
upon error


GetNextVertexID

GetNextVertexID ( self )
Internal safeguard


QDirected

QDirected ( self )
Returns 1 if the super graph is directed, 0 else


QEdge

QEdge (
self,
tail,
head,
)
Returns 1 if (tail,head) is an edge in G


QEuclidian

QEuclidian ( self )
Returns 1 if the super graph is euclidian, 0 else


Weight

Weight ( self )
Returns the total weight (= sum of edge weights) of subgraph


__init__

__init__ ( self, G )

