00001 /* $Id: CbcCountRowCut.hpp 1271 2009-11-05 15:57:25Z forrest $ */ 00002 // Copyright (C) 2002, International Business Machines 00003 // Corporation and others. All Rights Reserved. 00004 #ifndef CbcCountRowCut_H 00005 #define CbcCountRowCut_H 00006 00007 00008 class OsiCuts; 00009 class OsiRowCut; 00010 class CbcNodeInfo; 00011 00012 //############################################################################# 00033 class CbcCountRowCut : public OsiRowCut { 00034 00035 public: 00036 00039 00041 CbcCountRowCut (); 00042 00044 CbcCountRowCut ( const OsiRowCut &); 00045 00047 CbcCountRowCut(const OsiRowCut &, CbcNodeInfo *, int whichOne, 00048 int whichGenerator=-1,int numberPointingToThis=0); 00049 00056 virtual ~CbcCountRowCut (); 00058 00060 void increment(int change=1); 00061 00063 int decrement(int change=1); 00064 00072 void setInfo(CbcNodeInfo *, int whichOne); 00073 00075 inline int numberPointingToThis() 00076 { return numberPointingToThis_;} 00077 00079 inline int whichCutGenerator() const 00080 { return whichCutGenerator_;} 00081 00083 bool canDropCut(const OsiSolverInterface * solver, int row) const; 00084 00085 #ifdef CHECK_CUT_COUNTS 00086 // Just for printing sanity checks 00087 int tempNumber_; 00088 #endif 00089 00090 private: 00091 00093 CbcCountRowCut(const CbcCountRowCut &); 00094 00096 CbcCountRowCut & operator=(const CbcCountRowCut& rhs); 00097 00099 CbcNodeInfo * owner_; 00100 00103 int ownerCut_; 00104 00106 int numberPointingToThis_; 00107 00109 int whichCutGenerator_; 00110 00111 }; 00112 00113 #endif