Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

RCM Class Reference

#include <RCM.h>

Inheritance diagram for RCM::

GraphNumberer MovableObject List of all members.

Public Methods

 RCM (bool GPS=true)
 ~RCM ()
const IDnumber (Graph &theGraph, int lastVertex=-1)
const IDnumber (Graph &theGraph, const ID &lastVertices)
int sendSelf (int commitTag, Channel &theChannel)
int recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)

Detailed Description

RCM is a subclass of GraphNumberer which performs the numbering using the reverse Cuthill-McKee numbering algorithm. \

}

Definition at line 58 of file RCM.h.


Constructor & Destructor Documentation

RCM::RCM ( bool GPS = true )
 

The integer {classTag} is passed to the MovableObject classes constructor. The flag {GPS} is used to mark whether the Gibbs-Poole-Stodlmyer algorithm is used to determine a starting vertex when no starting vertex is given.

Definition at line 48 of file RCM.cpp.

RCM::~RCM ( )
 

Invokes the destructor on any ID object created when {number()} is invoked.

Definition at line 56 of file RCM.cpp.


Member Function Documentation

const ID & RCM::number ( Graph & theGraph,
const ID & lastVertices ) [virtual]
 

This method is invoked to determine the best starting Vertex for a RCM using a Vertex whose tag is in {lastVertices}. To do a RCM numbering is performed using each of the Vertices in {startVertices} as the Vertex in level set . The Vertex which results in the numbering with the smallest profile is chosen as the starting Vertex. The RCM algorithm outlined above is then called with this starting Vertex.

Reimplemented from GraphNumberer.

Definition at line 293 of file RCM.cpp.

const ID & RCM::number ( Graph & theGraph,
int lastVertex = -1 ) [virtual]
 

If the present ID used for the result is not of size equal to the number of Vertices in {theGraph}, it deletes the old and constructs a new ID. Starts by iterating through the Vertices of the graph setting the {tmp} variable of each to . The Vertices are then numbered using a depth first sort of the Graph, with each unmarked Vertex in the Graph at a distance from starting Vertex being placed in the d'th level set. As this is RCM, the Vertices in level set are assigned a higher number than those in level set with the {tmp} variable of the starting Vertex being assigned {numVertices} . The {tags} of the Vertices are placed into the ID at location given by their {tmp} variable. These are replaced with the {ref} variable of each Vertex, which is returned on successful completion.

The Vertex chosen as the starting Vertex is the one whose tag is given by {lastVertex}. If this is or the Vertex corresponding to {lastVertex} does not exist then another Vertex is chosen. If the {GPS} flag in constructor is {false} the first Vertex from the Graphs VertexIter is used; if {true} a RCM numbering using the first Vertex from the VertexIter is performed and the Vertices in the last level set are then used to create an ID {lastVertices} with which {number(theGraph, lastVertices)} can be invoked to determine the numbering.

Reimplemented from GraphNumberer.

Definition at line 76 of file RCM.cpp.

int RCM::recvSelf ( int commitTag,
Channel & theChannel,
FEM_ObjectBroker & theBroker ) [virtual]
 

Returns .

Reimplemented from MovableObject.

Definition at line 286 of file RCM.cpp.

int RCM::sendSelf ( int commitTag,
Channel & theChannel ) [virtual]
 

Returns .

Reimplemented from MovableObject.

Definition at line 280 of file RCM.cpp.


The documentation for this class was generated from the following files:
Copyright Contact Us