- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# /home/coin/svn-release/Alps-1.4.5/Cgl/src/CglLiftAndProject/CglLiftAndProject.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2000, International Business Machines
    00002 // Corporation and others.  All Rights Reserved.
    00003 // This code is licensed under the terms of the Eclipse Public License (EPL).
    00004
    00005 #ifndef CglLiftAndProject_H
    00006 #define CglLiftAndProject_H
    00007
    00008 #include <string>
    00009
    00010 #include "CglCutGenerator.hpp"
    00011
    00013 class CglLiftAndProject : public CglCutGenerator {
    00014    friend void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP,
    00015                                         const std::string mpdDir );
    00016
    00017 public:
    00024   virtual void generateCuts(const OsiSolverInterface & si, OsiCuts & cs,
    00025                             const CglTreeInfo info = CglTreeInfo()) const;
    00026
    00030   double getBeta() const {
    00031     return beta_;
    00032   }
    00033
    00037   void setBeta(int oneOrMinusOne){
    00038     if (oneOrMinusOne==1 || oneOrMinusOne==-1){
    00039       beta_= static_cast<double>(oneOrMinusOne);
    00040     }
    00041     else {
    00042       throw CoinError("Unallowable value. Beta must be 1 or -1",
    00043                       "cutGeneration","CglLiftAndProject");
    00044     }
    00045   }
    00046
    00048
    00051
    00052   CglLiftAndProject ();
    00053
    00055   CglLiftAndProject (
    00056     const CglLiftAndProject &);
    00057
    00059   virtual CglCutGenerator * clone() const;
    00060
    00062   CglLiftAndProject &
    00063     operator=(
    00064     const CglLiftAndProject& rhs);
    00065
    00067   virtual
    00068     ~CglLiftAndProject ();
    00070   virtual std::string generateCpp( FILE * fp);
    00072
    00073 private:
    00074
    00075  // Private member methods
    00076
    00079
    00081
    00082   // Private member data
    00083
    00086
    00087   double beta_;
    00089   double epsilon_;
    00091   double onetol_;
    00093 };
    00094
    00095 //#############################################################################
    00101 void CglLiftAndProjectUnitTest(const OsiSolverInterface * siP,
    00102                               const std::string mpdDir );
    00103
    00104 #endif