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

- File List
- File Members

# /home/coin/SVN-release/Cgl-0.53.1/Cgl/src/CglCutGenerator.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2000, International Business Machines
    00002 // Corporation and others.  All Rights Reserved.
    00003 #ifndef CglCutGenerator_H
    00004 #define CglCutGenerator_H
    00005
    00006 #include "OsiCuts.hpp"
    00007 #include "OsiSolverInterface.hpp"
    00008 #include "CglTreeInfo.hpp"
    00009
    00010 //-------------------------------------------------------------------
    00011 //
    00012 // Abstract base class for generating cuts.
    00013 //
    00014 //-------------------------------------------------------------------
    00016
    00021 class CglCutGenerator  {
    00022
    00023 public:
    00024
    00031   virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs,
    00032                              const CglTreeInfo info = CglTreeInfo()) const=0;
    00034
    00035
    00038
    00039   CglCutGenerator ();
    00040
    00042   CglCutGenerator ( const CglCutGenerator &);
    00043
    00045   virtual CglCutGenerator * clone() const = 0;
    00046
    00048   CglCutGenerator & operator=(const CglCutGenerator& rhs);
    00049
    00051   virtual ~CglCutGenerator ();
    00052
    00063   virtual std::string generateCpp( FILE * fp) {return "";}
    00064
    00066   virtual void refreshSolver(OsiSolverInterface * solver) {}
    00068
    00075   inline int getAggressiveness() const
    00076   { return aggressive_;}
    00077
    00082   inline void setAggressiveness(int value)
    00083   { aggressive_=value;}
    00084
    00092   virtual bool mayGenerateRowCutsInTree() const;
    00094   virtual bool needsOptimalBasis() const;
    00096
    00097   // test this class
    00098   //static void unitTest();
    00099
    00100 // private:
    00101
    00106   int aggressive_;
    00107 };
    00108
    00109 #endif