- Main Page
- Namespaces
- Classes
- Files
- Directories

- Search for |

- File List
- File Members

# CglDuplicateRow.hpp

Go to the documentation of this file.

    00001 // $Id: CglDuplicateRow.hpp 934 2011-01-04 23:17:26Z lou $
    00002 // Copyright (C) 2004, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004 // This code is licensed under the terms of the Eclipse Public License (EPL).
    00005
    00006 #ifndef CglDuplicateRow_H
    00007 #define CglDuplicateRow_H
    00008
    00009 #include <string>
    00010
    00011 #include "CglCutGenerator.hpp"
    00012 class CglStored;
    00013
    00015 class CglDuplicateRow : public CglCutGenerator {
    00016
    00017 public:
    00018
    00019
    00040   virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
    00041                              const CglTreeInfo info = CglTreeInfo()) const;
    00042 private:
    00044   void generateCuts12( const OsiSolverInterface & si, OsiCuts & cs,
    00045                        const CglTreeInfo info = CglTreeInfo()) const;
    00047   void generateCuts4( const OsiSolverInterface & si, OsiCuts & cs,
    00048                        const CglTreeInfo info = CglTreeInfo()) const;
    00050   void generateCuts8( const OsiSolverInterface & si, OsiCuts & cs,
    00051                        const CglTreeInfo info = CglTreeInfo()) const;
    00052 public:
    00072   CglStored * outDuplicates( OsiSolverInterface * solver);
    00073
    00075
    00078
    00079   inline const int * duplicate() const
    00080   { return duplicate_;}
    00082   inline int sizeDynamic() const
    00083   { return sizeDynamic_;}
    00085   inline int numberOriginalRows() const
    00086   { return matrix_.getNumRows();}
    00088
    00091
    00092   inline int logLevel() const
    00093   { return logLevel_;}
    00094   inline void setLogLevel(int value)
    00095   { logLevel_ = value;}
    00097
    00098
    00101
    00102   inline int maximumRhs() const
    00103   { return maximumRhs_;}
    00105   inline void setMaximumRhs(int value)
    00106   { maximumRhs_=value;}
    00108
    00111
    00112   inline int maximumDominated() const
    00113   { return maximumDominated_;}
    00115   inline void setMaximumDominated(int value)
    00116   { maximumDominated_=value;}
    00118
    00120
    00121   inline int mode() const
    00122   { return mode_;}
    00124   inline void setMode(int value)
    00125   { mode_=value;}
    00127
    00130
    00131   CglDuplicateRow ();
    00132
    00134   CglDuplicateRow (OsiSolverInterface * solver);
    00135
    00137   CglDuplicateRow (
    00138     const CglDuplicateRow & rhs);
    00139
    00141   virtual CglCutGenerator * clone() const;
    00142
    00144   CglDuplicateRow &
    00145     operator=(
    00146     const CglDuplicateRow& rhs);
    00147
    00149   virtual
    00150     ~CglDuplicateRow ();
    00152   virtual std::string generateCpp( FILE * fp);
    00153
    00155   virtual void refreshSolver(OsiSolverInterface * solver);
    00157
    00158 protected:
    00159
    00160
    00161   // Protected member data
    00162
    00165
    00166   CoinPackedMatrix matrix_;
    00168   CoinPackedMatrix matrixByRow_;
    00170   int * rhs_;
    00172   mutable int * duplicate_;
    00174   int * lower_;
    00176   mutable CglStored * storedCuts_;
    00178   int maximumDominated_;
    00180   int maximumRhs_;
    00182   mutable int sizeDynamic_;
    00184   int mode_;
    00186   int logLevel_;
    00188 };
    00189 #endif