XC Open source finite element analysis program
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members

The Graph class provides the abstraction of a graph, a collection of vertices and edges. The Graph class is a container class which stores and provides access to Vertex objects. The Vertices contain information about the edges in this design. More...

#include <Graph.h>

Inheritance diagram for XC::Graph:
XC::MovableObject XC::DistributedBase XC::ArrayGraph XC::ModelGraph XC::DOF_Graph XC::DOF_GroupGraph

Public Member Functions

 Graph (void)
 Constructor.
 
 Graph (int numVertices)
 Constructor.
 
 Graph (const Graph &other)
 Copy constructor.
 
Graphoperator= (const Graph &other)
 Assignment operator.
 
virtual bool addVertex (const Vertex &vertexPtr, bool checkAdjacency=true)
 Appends a vertex to the graph. If the adjacency list of the vertex is not empty, we check before that all the vertices of the list are already on the graph.
 
virtual int addEdge (int vertexTag, int otherVertexTag)
 Adds an edge to the graph. Previously we check that its vertices are already defined in the graph, otherwise it returns -1 (error condition) More...
 
virtual VertexgetVertexPtr (int vertexTag)
 Returns a pointer to the vertex identified by the tag being passed as parameter.
 
virtual const VertexgetVertexPtr (int vertexTag) const
 Returns a pointer to the vertex identified by the tag being passed as parameter.
 
virtual VertexItergetVertices (void)
 Returns an iterator to the vertices of the graph.
 
virtual int getNumVertex (void) const
 Returns the number of vertices del grafo.
 
virtual int getNumEdge (void) const
 Returns the número de aristas del grafo.
 
virtual int getFreeTag (void)
 Returns the siguiente identificador (tag) libre.
 
virtual bool removeVertex (int tag, bool removeEdgeFlag=true)
 Removes from the graph the vertex identified by the tag being passed as parameter.
 
const VertexBuscaRef (int ref) const
 
void getBand (int &, int &) const
 Returns the extremos del ancho de banda.
 
int getVertexDiffMaxima (void) const
 Returns the maximum (positive) of the difference between vertices indexes.
 
int getVertexDiffExtrema (void) const
 Returns the extreme (positive or negative) of the difference between vertices indexes.
 
virtual int merge (Graph &other)
 Mezcla los dos grafos.
 
virtual void Print (std::ostream &os, int flag=0)
 Imprime.
 
int sendSelf (CommParameters &)
 Sends object through the channel being passed as parameter.
 
int recvSelf (const CommParameters &)
 Receives object through the channel being passed as parameter.
 
- Public Member Functions inherited from XC::MovableObject
 MovableObject (int classTag, int dbTag)
 Constructor.
 
 MovableObject (int classTag)
 Constructor.
 
 MovableObject (const MovableObject &otro)
 Copy constructor.
 
MovableObjectoperator= (const MovableObject &otro)
 Operacdor asignación.
 
int getClassTag (void) const
 Returns the tag de la clase.
 
int getDbTag (void) const
 Returns the tag para la database.
 
int getDbTag (CommParameters &)
 Returns the tag para la database.
 
void setDbTag (int dbTag)
 Asigna el tag para la database.
 
void setDbTag (CommParameters &)
 Asigna, sólo si es preciso, el tag para la database.
 
virtual int setParameter (const std::vector< std::string > &argv, Parameter &param)
 
virtual int updateParameter (int parameterID, Information &info)
 
virtual int activateParameter (int parameterID)
 
virtual int setVariable (const std::string &variable, Information &)
 Returns the identificador de la variable cuyo nombre being passed as parameter.
 
virtual int getVariable (const std::string &variable, Information &)
 
- Public Member Functions inherited from XC::DistributedBase
 DistributedBase (void)
 Constructor.
 
virtual DbTagDatagetDbTagData (void) const
 Returns a vector to store class dbTags.
 
const int & getDbTagDataPos (const int &i) const
 Returns the data at the i-th position.
 
void setDbTagDataPos (const int &i, const int &v)
 Sets the data at the i-th position.
 
void inicComm (const int &dataSize) const
 Initializes communication.
 

Protected Member Functions

void inic (const size_t &)
 
void copia (const Graph &other)
 
int sendData (CommParameters &)
 Send object members through the channel being passed as parameter.
 
int recvData (const CommParameters &)
 Receives object members through the channel being passed as parameter.
 

Protected Attributes

ArrayOfTaggedObjects myVertices
 
VertexIter theVertexIter
 
int numEdge
 
int nextFreeTag
 

Friends

std::ostream & operator<< (std::ostream &s, Graph &M)
 

Detailed Description

The Graph class provides the abstraction of a graph, a collection of vertices and edges. The Graph class is a container class which stores and provides access to Vertex objects. The Vertices contain information about the edges in this design.

Member Function Documentation

int XC::Graph::addEdge ( int  vertexTag,
int  otherVertexTag 
)
virtual

Adds an edge to the graph. Previously we check that its vertices are already defined in the graph, otherwise it returns -1 (error condition)

Parameters
vertexTagend of the edge.
otherVertexTagthe other end of the edge.

Reimplemented in XC::ArrayGraph.


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