00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef Vertex_h
00027 #define Vertex_h
00028
00029
00030
00031
00032
00033
00034
00035
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