Cbc trunk
|
00001 /* $Id$ */ 00002 // Copyright (C) 2002, 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 CbcCountRowCut_H 00007 #define CbcCountRowCut_H 00008 00009 00010 class OsiCuts; 00011 class OsiRowCut; 00012 class CbcNodeInfo; 00013 00014 //############################################################################# 00035 class CbcCountRowCut : public OsiRowCut { 00036 00037 public: 00038 00041 00043 CbcCountRowCut (); 00044 00046 CbcCountRowCut ( const OsiRowCut &); 00047 00049 CbcCountRowCut(const OsiRowCut &, CbcNodeInfo *, int whichOne, 00050 int whichGenerator = -1, int numberPointingToThis = 0); 00051 00058 virtual ~CbcCountRowCut (); 00060 00062 void increment(int change = 1); 00063 00065 int decrement(int change = 1); 00066 00074 void setInfo(CbcNodeInfo *, int whichOne); 00075 00077 inline int numberPointingToThis() { 00078 return numberPointingToThis_; 00079 } 00080 00082 inline int whichCutGenerator() const { 00083 return whichCutGenerator_; 00084 } 00085 00087 bool canDropCut(const OsiSolverInterface * solver, int row) const; 00088 00089 #ifdef CHECK_CUT_COUNTS 00090 // Just for printing sanity checks 00091 int tempNumber_; 00092 #endif 00093 00094 private: 00095 00097 CbcCountRowCut(const CbcCountRowCut &); 00098 00100 CbcCountRowCut & operator=(const CbcCountRowCut& rhs); 00101 00103 CbcNodeInfo * owner_; 00104 00107 int ownerCut_; 00108 00110 int numberPointingToThis_; 00111 00113 int whichCutGenerator_; 00114 00115 }; 00116 00117 #endif 00118