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

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.1.1.1 $
00022 // $Date: 2000/09/15 08:23:21 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/graph/graph/Vertex.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef Vertex_h
00027 #define Vertex_h
00028 
00029 // File: ~/graph/graph/Vertex.h
00030 // 
00031 // Written: fmk 
00032 // Created: 11/96
00033 // Revision: A
00034 //
00035 // Description: This file contains the class definition for Vertex.
00036 // Vertex is an element of a graph.
00037 //
00038 // What: "@(#) Vertex.h, revA"
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 
Copyright Contact Us