00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00015
00016
00017
00018
00020
00021
00022 #ifndef CLIQUE_CONSTRAINT_HH
00023 #define CLIQUE_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 CliqueConstraint: public ABA_CONSTRAINT {
00040
00041
00042 public:
00043
00044
00045
00046
00047
00056 CliqueConstraint(ABA_MASTER *master, vector<int> *clique, Graph *theGraph);
00057
00061 virtual ~CliqueConstraint();
00062
00070 int genRow(ABA_ACTIVE<ABA_VARIABLE,ABA_CONSTRAINT> *var, ABA_ROW &row);
00071
00078 virtual double coeff(ABA_VARIABLE *var);
00079
00086 int getSize();
00087
00095 bool isInConstraint(int node);
00096
00104 virtual bool equal(ABA_CONVAR *cv);
00105
00112 virtual const char* name();
00113
00120 virtual unsigned hashKey();
00121
00122
00123 private:
00124
00125
00126
00127
00128
00135 void calculateHashKey();
00136
00137
00138
00139
00140
00141
00145 vector<int> nodesOfClique;
00146
00151 Graph *itsGraph;
00152
00156 unsigned thisHashKey;
00157 };
00158
00159 #endif
00160
00161
00162
00163