Vertex.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.3 $
00022 // $Date: 2005/11/03 23:11:55 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/graph/graph/Vertex.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef Vertex_h
00027 #define Vertex_h
00028 
00029 // Written: fmk 
00030 // Revision: A
00031 //
00032 // Description: This file contains the class definition for Vertex.
00033 // Vertex is an element of a graph.
00034 //
00035 // What: "@(#) Vertex.h, revA"
00036 
00037 #ifndef _bool_h
00038 #include "bool.h"
00039 #endif
00040 
00041 #include <TaggedObject.h>
00042 #include <ID.h>
00043 
00044 #define START_VERTEX_NUM 0
00045 class Channel;
00046 class FEM_ObjectBroker;
00047 
00048 class Vertex: public TaggedObject
00049 {
00050   public:
00051     Vertex(int tag, int ref, double weight=0, int color =0);
00052     Vertex(const Vertex &other);
00053 
00054     virtual ~Vertex();
00055 
00056     virtual void setWeight(double newWeight);
00057     virtual void setColor(int newColor);
00058     virtual void setTmp(int newTmp);    
00059     
00060     virtual int getRef(void) const;
00061     virtual double getWeight(void) const;
00062     virtual int getColor(void) const;
00063     virtual int getTmp(void) const;    
00064 
00065     virtual int addEdge(int otherTag);
00066     virtual int getDegree(void) const;
00067     virtual const ID &getAdjacency(void) const;
00068 
00069     virtual  void Print(OPS_Stream &s, int flag =0);
00070     int sendSelf(int commitTag, Channel &theChannel);
00071     int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00072   
00073   protected:
00074     
00075   private:
00076     int myRef;
00077     double myWeight;
00078     int myColor;
00079     int myDegree;
00080     int myTmp;
00081     ID  myAdjacency;
00082 };
00083 
00084 #endif
00085 

Generated on Mon Oct 23 15:05:12 2006 for OpenSees by doxygen 1.5.0