Page principale | Hiérarchie des classes | Liste des composants | Liste des fichiers | Composants

maxclique.h

00001 
00004 /* Clique Problem : one searches for a clique of given size in a graph  : by increasing the clique size, one solves
00005 the classical Maximum clique problem  : the graphs are given in standard Dimacs format*/
00006 
00014 /* CliqueProblem class : searching for a clique of size cliquesize  : one minimizes the conflict (number of missing edges
00015 for variables in clique array ; the remaining variables are in remainvariables array. The neighborhood is to exchange 
00016 2 variables between the 2 arrays (class ExchangeMove defined in move.h */
00017 
00018 class CliqueProblem : public BinaryCSProblem
00019 { public :
00021 /* size of the clique to be found */
00022   int cliquesize;
00024 /* clique array : the variables in the configuration trying to form a clique */
00025   int* clique(Configuration* configuration);
00027 /* remainvariables array : the variables in configuration not in clique array */
00028   int* remainvariables(Configuration* configuration);
00029   CliqueProblem(int nvar, int nconst, int clsize);
00030   int config_evaluation(Configuration*  configuration);
00031   int config_evaluation_verif(Configuration*  configuration);
00032   int move_evaluation (Configuration* configuration, Move* move);
00033   void incr_update_conflicts(IncrCSPConfiguration* configuration,Move* move);
00034   void fullincr_update_conflicts(FullincrCSPConfiguration* configuration,Move* move);
00035   void init_domains(int nbvar);
00036   // int compute_conflict (Configuration* configuration,int var, int val);
00037   //  void compute_var_conflict(Configuration* configuration);
00038 void random_configuration(Configuration* configuration);
00039 void move_execution(Configuration* configuration,Move* move);
00040 void solution_write();
00041   void next_move (Configuration* configuration, Move* move, NeighborhoodSearch* nbhs);
00042 Move* create_move();
00043 Configuration* create_configuration();
00044 int minconflict_invariable(Configuration* configuration);
00045 };
00046 
00047 CliqueProblem* probleme_maxclique(int nbvar,int nbconst,int clsize,int** constraint1);
00048 CliqueProblem* clique_problem_creation (int clsize,ifstream & file);
00049 void lire_debut_fichier_clique(ifstream & file, int& nbvar, int& nbconst);
00050 void lire_fichier_clique (ifstream& file, vector<int>* connexions,int ** constraint1);
00051 
00059 /* Configuration for the clique problem (as one uses a  datastructure for the conflicts : is implemented as a
00060 subclass of FullincrCSPConfiguration (could also be a subclass of IncrCSPConfiguration : only one conflict
00061 value stored by variable : the number of missing edges with the variables in clique array. */
00062 
00063 class CliqueConfiguration: public FullincrCSPConfiguration
00064 { public :
00065  int cliquesize;
00067 /* the variables in the configuration trying to form a clique : the number of missing edges to form a clique is
00068 the evaluation of the configuration*/
00069  int* clique;
00071 /* remainvariables array : the variables in configuration not in clique array */
00072  int* remainvariables;
00073  CliqueConfiguration(int nbvar,int cliquesize);
00074  ~CliqueConfiguration();
00075  void copy_element (Configuration* config2);
00076 };

Généré le Fri Sep 26 16:54:19 2003 pour INCOP par doxygen 1.3.3