denseBiGraph Class Reference

A class for bipartite graphs represented with arc capacity (adjacency) matrices. More...

#include <denseBigraph.h>

Inheritance diagram for denseBiGraph:

abstractBiGraph abstractGraph abstractMixedGraph managedObject goblinRootObject

Public Member Functions

 denseBiGraph (TNode _n1, TNode _n2, TOption options=0, goblinController &_CT=goblinDefaultContext) throw ()
 denseBiGraph (const char *fileName, goblinController &_CT=goblinDefaultContext) throw (ERFile,ERParse)
 denseBiGraph (abstractBiGraph &G) throw ()
 ~denseBiGraph () throw ()
void ReadNNodes (goblinImport &F) throw (ERParse)
unsigned long Size () const throw ()
unsigned long Allocated () const throw ()
TArc Adjacency (TNode u, TNode v, TMethAdjacency method=ADJ_MATRIX) const throw (ERRange)
TNode StartNode (TArc a) const throw (ERRange)
TNode EndNode (TArc a) const throw (ERRange)
TArc First (TNode v) const throw (ERRange)
TArc Right (TArc a, TNode v=NoNode) const throw (ERRange)

Protected Attributes

denseRepresentation X

Detailed Description

A class for bipartite graphs represented with arc capacity (adjacency) matrices.


Constructor & Destructor Documentation

denseBiGraph TNode  _n1,
TNode  _n2,
TOption  options = 0,
goblinController _CT = goblinDefaultContext
throw ()
 

Default constructor for dense bigraphs.

Parameters:
_n1 The initial number of left-hand nodes
_n2 The initial number of right-hand nodes
options Either 0 or OPT_COMPLETE
_CT The context to which this graph object is attached

denseBiGraph const char *  fileName,
goblinController _CT = goblinDefaultContext
throw (ERFile,ERParse)
 

File constructor for dense bigraphs.

Parameters:
fileName The source file name
_CT The context to which this graph object is attached

denseBiGraph abstractBiGraph G  )  throw ()
 

Copy constructor for dense bigraphs.

Parameters:
G The original bigraph object

~denseBiGraph  )  throw ()
 


Member Function Documentation

TArc Adjacency TNode  u,
TNode  v,
TMethAdjacency  method = ADJ_MATRIX
const throw (ERRange)
 

unsigned long Allocated  )  const throw ()
 

Reimplemented from abstractBiGraph.

TNode EndNode TArc  a  )  const throw (ERRange) [virtual]
 

Query the end node of a given arc.

Parameters:
a An arc index ranged [0,1,..,2*mAct-1]
Returns:
The index of the end node

Reimplemented from abstractMixedGraph.

TArc First TNode  v  )  const throw (ERRange) [virtual]
 

Retrieve an arc with a given start node.

The First(v) incidence is somewhat arbitrary, since icidence lists are cyclic. But when an arc is inserted, it is inserted into the incidence lists right after the First() incidence. If the graph is planely represented, and v is an exterior node, the first two incidences are usually exterior arcs, and inserting an arc with two exterior end nodes preserves the planar representation.

Parameters:
v A node index ranged [0,1,..,nAct-1]
Returns:
The index of an outgoing arc

Implements abstractMixedGraph.

void ReadNNodes goblinImport F  )  throw (ERParse) [virtual]
 

Read the number of nodes from file.

Parameters:
F An input file stream
This reads the number of graph nodes, the number of layout points and, if the graph is bipartite, the number of left-hand nodes. This operation must occur prior to all attribute read attempts.

Reimplemented from abstractBiGraph.

TArc Right TArc  a,
TNode  v = NoNode
const throw (ERRange) [virtual]
 

Query the successor of a given arc in the incidence list of its start node.

Parameters:
a An arc index ranged [0,1,..,2*mAct-1]
v The index of the start node of a (only to reduce lookup times)
Returns:
The index of the right-hand incident arc

Implements abstractMixedGraph.

unsigned long Size  )  const throw () [virtual]
 

Implements goblinRootObject.

TNode StartNode TArc  a  )  const throw (ERRange) [virtual]
 

Query the start node of a given arc.

Parameters:
a An arc index ranged [0,1,..,2*mAct-1]
Returns:
The index of the start node

Implements abstractMixedGraph.


Field Documentation

denseRepresentation X [protected]