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

Go to the documentation of this file.
00001 
00002 //
00003 //  Module           : RankConstraint.hh
00004 //  Description      : Constraint class for a rank inequality.
00005 //  Author           : Steffen Rebennack
00006 //  Email            : srebenac@ix.urz.uni-heidelberg.de;
00007 //                     steffen.rebennack@web.de
00008 //  Copyright        : (C) 2006 by the University of Heidelberg
00009 //  Created on       : Wed Apr 05 14:08:54 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 RANK_CONSTRAINT_HH
00023 #define RANK_CONSTRAINT_HH
00024 
00025 
00026 #include "abacus/constraint.h"
00027 #include <vector>
00028 
00029 using namespace std;
00030 
00031 class Graph;
00032 
00033 
00039 class RankConstraint: public ABA_CONSTRAINT {
00040 
00041 
00042 public:
00043 
00044     // -------------------------------------------------------------------------
00045     // ------------- M e t h o d s  ( p u b l i c ) ----------------------------
00046     // -------------------------------------------------------------------------
00047 
00057     RankConstraint(ABA_MASTER *master, vector<int> *nodes, int rhs,
00058                    Graph *theGraph);
00059 
00071     RankConstraint(ABA_MASTER *master, vector<int> *nodes, int rhs,
00072                    bool dynamic, Graph *theGraph);
00073 
00077     virtual ~RankConstraint();
00078 
00086     int genRow(ABA_ACTIVE<ABA_VARIABLE,ABA_CONSTRAINT> *var, ABA_ROW &row);
00087 
00094     virtual double coeff(ABA_VARIABLE *var);
00095 
00102     int getSize();
00103 
00111     bool isInConstraint(int node);
00112 
00120     virtual bool equal(ABA_CONVAR *cv);
00121 
00128     virtual const char* name();
00129 
00136     virtual unsigned hashKey();
00137 
00138 
00139 private:
00140 
00141     // -------------------------------------------------------------------------
00142     // ------------- M e t h o d s  ( p r i v a t e ) --------------------------
00143     // -------------------------------------------------------------------------
00144 
00148     void calculateHashKey();
00149 
00150 
00151     // -------------------------------------------------------------------------
00152     // ------------- V a r i a b l e s  ( p r i v a t e ) ----------------------
00153     // -------------------------------------------------------------------------
00157     vector<int> itsNodes;
00158 
00163     Graph *itsGraph;
00164 
00168     int itsRhs;
00169 
00173     unsigned thisHashKey;
00174 };
00175 
00176 #endif
00177 
00178 

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