coin-Cgl
CglStored.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #ifndef CglStored_H
4 #define CglStored_H
5 
6 #include <string>
7 
8 #include "CglCutGenerator.hpp"
9 
10 class CoinWarmStartBasis;
11 class CglTreeProbingInfo;
13 class CglStored : public CglCutGenerator {
14 
15 public:
16 
17 
28  virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
29  const CglTreeInfo info = CglTreeInfo()) const;
31 
36  inline void setRequiredViolation(double value)
38  { requiredViolation_=value;}
40  inline double getRequiredViolation() const
41  { return requiredViolation_;}
43  inline void setProbingInfo(CglTreeProbingInfo * info)
44  { probingInfo_ = info;}
46 
49  void addCut(const OsiCuts & cs);
52  void addCut(const OsiRowCut & cut);
54  void addCut(double lb, double ub, const CoinPackedVector & vector);
56  void addCut(double lb, double ub, int size, const int * colIndices, const double * elements);
57  inline int sizeRowCuts() const
58  { return cuts_.sizeRowCuts();}
59  const OsiRowCut * rowCutPointer(int index) const
60  { return cuts_.rowCutPtr(index);}
62  void saveStuff(double bestObjective, const double * bestSolution,
63  const double * lower, const double * upper);
65  inline const double * bestSolution() const
66  { return bestSolution_;}
68  double bestObjective() const;
70  const double * tightLower() const
71  { return bounds_;}
73  const double * tightUpper() const
74  { return bounds_+numberColumns_;}
76 
79  CglStored (int numberColumns=0);
81 
83  CglStored (const CglStored & rhs);
84 
86  CglStored (const char * fileName);
87 
89  virtual CglCutGenerator * clone() const;
90 
92  CglStored &
93  operator=(const CglStored& rhs);
94 
96  virtual
97  ~CglStored ();
99 
100 protected:
101 
102  // Protected member methods
103 
104  // Protected member data
105 
108  double requiredViolation_;
113  mutable OsiCuts cuts_;
117  double * bestSolution_;
119  double * bounds_;
121 };
122 #endif