CbcCountRowCut.hpp
Go to the documentation of this file.
1 /* $Id: CbcCountRowCut.hpp 1432 2010-02-07 19:33:53Z bjarni $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 #ifndef CbcCountRowCut_H
5 #define CbcCountRowCut_H
6 
7 
8 class OsiCuts;
9 class OsiRowCut;
10 class CbcNodeInfo;
11 
12 //#############################################################################
33 class CbcCountRowCut : public OsiRowCut {
34 
35 public:
36 
39 
41  CbcCountRowCut ();
42 
44  CbcCountRowCut ( const OsiRowCut &);
45 
47  CbcCountRowCut(const OsiRowCut &, CbcNodeInfo *, int whichOne,
48  int whichGenerator = -1, int numberPointingToThis = 0);
49 
56  virtual ~CbcCountRowCut ();
58 
60  void increment(int change = 1);
61 
63  int decrement(int change = 1);
64 
72  void setInfo(CbcNodeInfo *, int whichOne);
73 
75  inline int numberPointingToThis() {
76  return numberPointingToThis_;
77  }
78 
80  inline int whichCutGenerator() const {
81  return whichCutGenerator_;
82  }
83 
85  bool canDropCut(const OsiSolverInterface * solver, int row) const;
86 
87 #ifdef CHECK_CUT_COUNTS
88  // Just for printing sanity checks
89  int tempNumber_;
90 #endif
91 
92 private:
93 
96 
99 
102 
106 
109 
112 
113 };
114 
115 #endif
116 
bool canDropCut(const OsiSolverInterface *solver, int row) const
Returns true if can drop cut if slack basic.
int numberPointingToThis()
Number of other CbcNodeInfo objects pointing to this row cut.
virtual ~CbcCountRowCut()
Destructor.
CbcNodeInfo * owner_
Backward pointer to owning CbcNodeInfo.
void setInfo(CbcNodeInfo *, int whichOne)
Set the information associating this cut with a node.
Information required to recreate the subproblem at this node.
Definition: CbcNodeInfo.hpp:62
int whichCutGenerator() const
Which generator for cuts - as user order.
int decrement(int change=1)
Decrement the number of references and return the number left.
int numberPointingToThis_
Number of other CbcNodeInfo objects pointing to this cut.
int whichCutGenerator_
Which generator created this cut.
int ownerCut_
Index of cut in owner's cut set (cuts_ ).
OsiRowCut augmented with bookkeeping.
CbcCountRowCut()
Default Constructor.
CbcCountRowCut & operator=(const CbcCountRowCut &rhs)
Standard assignment is illegal (reference counts would be incorrect)
void increment(int change=1)
Increment the number of references.