00001 // Copyright (C) 2005, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #ifndef CglAllDifferent_H 00004 #define CglAllDifferent_H 00005 00006 #include <string> 00007 00008 #include "CglCutGenerator.hpp" 00009 00018 class CglAllDifferent : public CglCutGenerator { 00019 00020 public: 00021 00022 00027 virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs, 00028 const CglTreeInfo info = CglTreeInfo()) const; 00030 00031 00034 00035 CglAllDifferent (); 00036 00038 CglAllDifferent(int numberSets, const int * starts, const int * which); 00039 00041 CglAllDifferent ( 00042 const CglAllDifferent &); 00043 00045 virtual CglCutGenerator * clone() const; 00046 00048 CglAllDifferent & 00049 operator=( 00050 const CglAllDifferent& rhs); 00051 00053 virtual 00054 ~CglAllDifferent (); 00056 virtual std::string generateCpp( FILE * fp); 00057 00059 virtual void refreshSolver(OsiSolverInterface * solver); 00067 virtual bool mayGenerateRowCutsInTree() const 00068 { return false;} 00070 00072 00073 inline void setLogLevel(int value) 00074 { logLevel_=value;} 00076 inline int getLogLevel() const 00077 { return logLevel_;} 00079 inline void setMaxLook(int value) 00080 { maxLook_=value;} 00082 inline int getMaxLook() const 00083 { return maxLook_;} 00085 00086 private: 00087 00088 // Private member methods 00091 00092 00093 // Private member data 00094 00097 00098 int numberSets_; 00100 int numberDifferent_; 00102 int maxLook_; 00104 int logLevel_; 00106 int * start_; 00108 int * which_; 00110 int * originalWhich_; 00112 }; 00113 #endif