coin-Cgl
CglOddHole.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #ifndef CglOddHole_H
4 #define CglOddHole_H
5 
6 #include <string>
7 
8 #include "CglCutGenerator.hpp"
9 
11 class CglOddHole : public CglCutGenerator {
12  friend void CglOddHoleUnitTest(const OsiSolverInterface * siP,
13  const std::string mpdDir );
14 
15 public:
16 
17 
38  virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
39  const CglTreeInfo info = CglTreeInfo()) const;
41 
44  void createRowList( const OsiSolverInterface & si,
48  const int * possible=NULL);
50  void createRowList(int numberRows, const int * whichRow);
52 
55  void createCliqueList(int numberCliques, const int * cliqueStart,
58  const int * cliqueMember);
60 
63  int numberPossible();
66 
68  double getMinimumViolation() const;
70  void setMinimumViolation(double value);
72  double getMinimumViolationPer() const;
73  void setMinimumViolationPer(double value);
75  int getMaximumEntries() const;
76  void setMaximumEntries(int value);
78 
81  CglOddHole ();
83 
85  CglOddHole (
86  const CglOddHole &);
87 
89  virtual CglCutGenerator * clone() const;
90 
92  CglOddHole &
93  operator=(
94  const CglOddHole& rhs);
95 
97  virtual
98  ~CglOddHole ();
99 
101  virtual void refreshSolver(OsiSolverInterface * solver);
103 
104 private:
105 
106  // Private member methods
107 
108 
111  void generateCuts(const OsiRowCutDebugger * debugger,
114  const CoinPackedMatrix & rowCopy,
115  const double * solution, const double * dj,
116  OsiCuts & cs, const int * suitableRow,
117  const int * fixedColumn,const CglTreeInfo info,
118  bool packed);
120 
121  // Private member data
122 
125  int * suitableRows_;
130  int * member_;
132  double epsilon_;
134  double onetol_;
146 };
147 
148 //#############################################################################
154 void CglOddHoleUnitTest(const OsiSolverInterface * siP,
155  const std::string mpdDir );
156 
157 #endif