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
00038
00039
00040 #ifndef _bool_h
00041 #include "bool.h"
00042 #endif
00043
00044 #include <TaggedObject.h>
00045 #include <ID.h>
00046
00047 #define START_VERTEX_NUM 0
00048
00052 class Vertex: public TaggedObject
00053 {
00054 public:
00056 Vertex(int tag, int ref, double weight=0, int color =0);
00057
00059 virtual ~Vertex();
00060
00062 virtual void setWeight(double newWeight);
00064 virtual void setColor(int newColor);
00066 virtual void setTmp(int newTmp);
00067
00069 virtual int getRef(void) const;
00071 virtual double getWeight(void) const;
00073 virtual int getColor(void) const;
00075 virtual int getTmp(void) const;
00076
00078 virtual int addEdge(int otherTag);
00080 virtual int getDegree(void) const;
00082 virtual const ID &getAdjacency(void) const;
00083
00085 virtual void Print(ostream &s, int flag =0);
00086
00087 protected:
00088
00089 private:
00091 int myRef;
00093 double myWeight;
00095 int myColor;
00097 int myDegree;
00099 int myTmp;
00101 ID myAdjacency;
00102 };
00103
00104 #endif
00105