Preprocessing Class Reference

#include <Preprocessing.hh>

List of all members.

Public Member Functions

 Preprocessing (StableSetMaster *master, Graph *theGraph, StableSetStatistics *theStatistics)
virtual ~Preprocessing ()
void preprocessing ()


Detailed Description

The class

Definition at line 41 of file Preprocessing.hh.


Constructor & Destructor Documentation

Preprocessing::Preprocessing StableSetMaster master,
Graph theGraph,
StableSetStatistics theStatistics
 

Constructor.

Parameters:
*master Pointer to the corresponding master of the optimization.
*theGraph Pointer to the object representing the graph of the problem.
*theStatistics Pointer to an object managing the statistics.

Definition at line 40 of file Preprocessing.cpp.

00041                                                                 :
00042     itsMaster(theMaster),
00043     itsGraph(theGraph),
00044     itsStatistics(theStatistics)
00045 {
00046 }

Preprocessing::~Preprocessing  )  [virtual]
 

Destructor.

Definition at line 52 of file Preprocessing.cpp.

00052                               {
00053 }


Member Function Documentation

void Preprocessing::preprocessing  ) 
 

Start preprocessing.

Parameters:
void 
Returns:
void

Definition at line 61 of file Preprocessing.cpp.

References Graph::numberOfNodes().

00061                                   {
00062 
00063     bool   fixed = true; // Indicate if a fixing could be done. 
00064     double *sol;         // Pointer to LP-solution.
00065 
00066     //
00067     // Fix nodes until no fixing could be done.
00068     //
00069     while (fixed) {
00070 
00071         //
00072         // Call clique fixing.
00073         //
00074         fixed = fixVariablesClique();
00075 
00076         //
00077         // Fixing according to LP.
00078         //
00079         if (itsGraph->numberOfNodes()) {
00080             sol = solveLP();
00081             fixed = fixVariablesEdgeLP(sol) || fixed;
00082             if (!itsGraph->numberOfNodes()) {
00083                 fixed = false;            
00084             }
00085 
00086             delete [] sol;
00087         }
00088     }// while
00089 
00090     if (itsGraph->numberOfNodes() == 0) {
00091         // Solution was found during preprocessing.
00092         itsStatistics->solutionFound(3);
00093     }
00094 
00095     itsMaster->sortFixedNodes();
00096 
00097 }// end: void preprocessing()


The documentation for this class was generated from the following files:
Generated on Fri Apr 28 15:50:00 2006 for Branch and Cut algorithm for the Maximum Stable Set Problem by  doxygen 1.4.6-NO