Table of Contents

Class: SubGraph /amd/bernoulli/1/home/abt_vin/georgi/hmm/0.7/ghmm//ghmmwrapper/Graph.py

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

Base Classes   
Graph
Methods   
AddEdge
AddSubGraph
AddVertex
Clear
DeleteEdge
GetNextVertexID
QDirected
QEdge
QEuclidian
Weight
__init__
  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

Exceptions   
NoSuchEdgeError
  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

Exceptions   
NoSuchVertexError
  Clear 
Clear ( self )

Delete all vertices and edges from the subgraph.

  DeleteEdge 
DeleteEdge (
        self,
        tail,
        head,
        )

Delete edge from subgraph. Raises NoSuchEdgeError upon error

Exceptions   
NoSuchEdgeError
  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 )


Table of Contents

This document was automatically generated on Fri Jan 20 14:56:59 2006 by HappyDoc version WORKING