#include <Preprocessing.hh>
Public Member Functions | |
Preprocessing (StableSetMaster *master, Graph *theGraph, StableSetStatistics *theStatistics) | |
virtual | ~Preprocessing () |
void | preprocessing () |
Definition at line 41 of file Preprocessing.hh.
|
Constructor.
Definition at line 40 of file Preprocessing.cpp. 00041 : 00042 itsMaster(theMaster), 00043 itsGraph(theGraph), 00044 itsStatistics(theStatistics) 00045 { 00046 }
|
|
Destructor. Definition at line 52 of file Preprocessing.cpp.
|
|
Start preprocessing.
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()
|