/home/coin/SVN-release/CoinAll-1.1.0/Cgl/src/CglTreeInfo.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2000, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 
00004 #ifndef CglTreeInfo_H
00005 #define CglTreeInfo_H
00006 
00007 #include "OsiCuts.hpp"
00008 #include "OsiSolverInterface.hpp"
00009 #include "CoinHelperFunctions.hpp"
00010 class CglStored;
00013 class CglTreeInfo {
00014 public:
00016   int level;
00019   int pass;
00022   int formulation_rows;
00024   bool inTree;
00034   OsiRowCut ** strengthenRow;
00036   CoinThreadRandom * randomNumberGenerator;
00038   CglTreeInfo ();
00039  
00041   CglTreeInfo (
00042     const CglTreeInfo &);
00044   virtual CglTreeInfo * clone() const;
00045 
00047   CglTreeInfo &
00048     operator=(
00049     const CglTreeInfo& rhs);
00050   
00052   virtual
00053     ~CglTreeInfo ();
00055   virtual void fixes(int variable, int toValue, int fixedVariable,bool fixedToLower) {}
00057   virtual bool initializeFixing(const OsiSolverInterface * model) {return false;}
00058   
00059 };
00060 
00062 typedef struct {
00063   unsigned int oneFixed:1; //  nonzero if variable fixed to 1
00064   unsigned int sequence:31; //  variable (in matrix)
00065 } fixEntry;
00066 
00067 class CglTreeProbingInfo : public CglTreeInfo {
00068 public:
00070   CglTreeProbingInfo ();
00072   CglTreeProbingInfo (const OsiSolverInterface * model);
00073  
00075   CglTreeProbingInfo (
00076     const CglTreeProbingInfo &);
00078   virtual CglTreeInfo * clone() const;
00079 
00081   CglTreeProbingInfo &
00082     operator=(
00083     const CglTreeProbingInfo& rhs);
00084   
00086   virtual
00087     ~CglTreeProbingInfo ();
00088   OsiSolverInterface * analyze(const OsiSolverInterface & si, int createSolver=0);
00090   virtual void fixes(int variable, int toValue, int fixedVariable,bool fixedToLower);
00092   virtual bool initializeFixing(const OsiSolverInterface * model) ;
00094   inline fixEntry * fixEntries() const
00095   { convert(); return fixEntry_;}
00097   inline int * toZero() const
00098   { convert(); return toZero_;}
00100   inline int * toOne() const
00101   { convert(); return toOne_;}
00103   inline int * integerVariable() const
00104   { return integerVariable_;}
00106   inline int * backward() const
00107   { return backward_;}
00109   inline int numberVariables() const
00110   { return numberVariables_;}
00112   inline int numberIntegers() const
00113   { return numberIntegers_;}
00114 private:
00116   void convert() const;
00117 protected:
00119   mutable fixEntry * fixEntry_;
00121   mutable int * toZero_;
00123   mutable int * toOne_;
00125   int * integerVariable_;
00127   int * backward_;
00129   mutable int * fixingEntry_;
00131   int numberVariables_;
00133   int numberIntegers_;
00135   int maximumEntries_;
00137   mutable int numberEntries_;
00138 };
00139 
00140 #endif

Generated on Sun Nov 14 14:06:31 2010 for Coin-All by  doxygen 1.4.7