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

Go to the documentation of this file.
00001 
00002 //
00003 //  Module           : OddCycleConstraint.hh
00004 //  Description      : Odd cycle constraint.
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 15:02:50 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 ODD_CYCLE_CONSTRAINT_HH
00023 #define ODD_CYCLE_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 OddCycleConstraint: 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 
00058     OddCycleConstraint(ABA_MASTER *master, int oddCycleSize, int *nodes,
00059                        Graph *itsGraph);
00060      
00064     virtual ~OddCycleConstraint();
00065     
00073     int genRow(ABA_ACTIVE<ABA_VARIABLE,ABA_CONSTRAINT> *var, ABA_ROW &row);
00074 
00081     virtual double coeff(ABA_VARIABLE *var);
00082 
00089     int getSize();
00090 
00098     bool isInConstraint(int node);
00099 
00107     virtual bool equal(ABA_CONVAR *cv);
00108 
00115     virtual const char* name();
00116 
00123     virtual unsigned hashKey();
00124 
00125 
00126 private:
00127 
00128     // -------------------------------------------------------------------------
00129     // ------------- M e t h o d s  ( p r i v a t e ) --------------------------
00130     // -------------------------------------------------------------------------
00131 
00138     void calculateHashKey();
00139 
00140 
00141     // -------------------------------------------------------------------------
00142     // ------------- V a r i a b l e s  ( p r i v a t e ) ----------------------
00143     // -------------------------------------------------------------------------
00144 
00148     vector<int> oddCycle;
00149 
00153     unsigned thisHashKey;
00154 
00159     Graph *itsGraph;
00160 };
00161 
00162 #endif
00163 
00164 

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