/build/buildd/coinor-cbc-2.5.0/Cbc/src/CbcCountRowCut.hpp
Go to the documentation of this file.
00001 /* $Id: CbcCountRowCut.hpp 1432 2010-02-07 19:33:53Z bjarni $ */
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     }
00078 
00080     inline int whichCutGenerator() const {
00081         return whichCutGenerator_;
00082     }
00083 
00085     bool canDropCut(const OsiSolverInterface * solver, int row) const;
00086 
00087 #ifdef CHECK_CUT_COUNTS
00088     // Just for printing sanity checks
00089     int tempNumber_;
00090 #endif
00091 
00092 private:
00093 
00095     CbcCountRowCut(const CbcCountRowCut &);
00096 
00098     CbcCountRowCut & operator=(const CbcCountRowCut& rhs);
00099 
00101     CbcNodeInfo * owner_;
00102 
00105     int ownerCut_;
00106 
00108     int numberPointingToThis_;
00109 
00111     int whichCutGenerator_;
00112 
00113 };
00114 
00115 #endif
00116