C:/Programme/home/Administrator/CD/stableSetCode/GeneralConstraint.hh

Go to the documentation of this file.
00001 
00002 //
00003 //  Module           : GeneralConstraint.hh
00004 //  Description      : Store a general integer constraint.
00005 //  Author           : Steffen Rebennack
00006 //  Email            : srebenac@ix.urz.uni-heidelberg.de;
00007 //                     steffen.rebennack@web.de
00008 //  Copyright        : (C) 2005 by the University of Heidelberg
00009 //  Created on       : Wed Apr 05 11:09:11 2006
00010 //  Last modified by : -
00011 //  Last modified on : -
00012 //  Update count     : 0
00013 //
00015 //
00016 //  Date        Name            Changes/Extensions
00017 //  ----        ----            ------------------
00018 //
00020 
00021 
00022 #ifndef GENERAL_CONSTRAINT_HH
00023 #define GENERAL_CONSTRAINT_HH
00024 
00025 
00026 #include "abacus/constraint.h"
00027 #include <vector>
00028 
00029 using namespace std;
00030 
00031 class Graph;
00032 
00033 
00038 class GeneralConstraint: public ABA_CONSTRAINT {
00039 
00040 
00041 public:
00042 
00043     // -------------------------------------------------------------------------
00044     // ------------- M e t h o d s  ( p u b l i c ) ----------------------------
00045     // -------------------------------------------------------------------------
00046 
00058     GeneralConstraint(ABA_MASTER *master, vector<int> *vertices,
00059                       vector<int> *dualCoeff, int rhs, Graph *theGraph);
00060 
00064     virtual ~GeneralConstraint();
00065 
00073     int genRow(ABA_ACTIVE<ABA_VARIABLE,ABA_CONSTRAINT> *var, ABA_ROW &row);
00074 
00081     virtual double coeff(ABA_VARIABLE *var);
00082 
00088     int getSize();
00089 
00097     bool isInConstraint(int node);
00098 
00106     virtual bool equal(ABA_CONVAR *cv);
00107 
00113     virtual const char* name();
00114 
00120     virtual unsigned hashKey();
00121 
00122 
00123 private:
00124 
00125     // -------------------------------------------------------------------------
00126     // ------------- M e t h o d s  ( p r i v a t e ) --------------------------
00127     // -------------------------------------------------------------------------
00128 
00132     void calculateHashKey();
00133 
00134 
00135     // -------------------------------------------------------------------------
00136     // ------------- V a r i a b l e s  ( p r i v a t e ) ----------------------
00137     // -------------------------------------------------------------------------
00138 
00142     vector<int> nodes;
00143 
00147     vector<int> coefficients;
00148 
00152     int itsRhs;
00153 
00157     Graph *itsGraph;
00158 
00162     unsigned thisHashKey;
00163 };
00164 
00165 #endif
00166 
00167 
00168 
00169 

Generated on Fri Apr 28 15:49:59 2006 for Branch and Cut algorithm for the Maximum Stable Set Problem by  doxygen 1.4.6-NO