CbcBranchLink.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #ifndef CbcBranchLink_H
4 #define CbcBranchLink_H
5 
6 #include "CbcBranchBase.hpp"
7 
13 class CbcLink : public CbcObject {
14 
15 public:
16 
17  // Default Constructor
18  CbcLink ();
19 
27  int numberLinks, int first,
28  const double * weights, int setNumber);
35  CbcLink (CbcModel * model, int numberMembers,
36  int numberLinks, int typeSOS, const int * which,
37  const double * weights, int setNumber);
38 
39  // Copy constructor
40  CbcLink ( const CbcLink &);
41 
43  virtual CbcObject * clone() const;
44 
45  // Assignment operator
46  CbcLink & operator=( const CbcLink& rhs);
47 
48  // Destructor
49  ~CbcLink ();
50 
52  virtual double infeasibility(int & preferredWay) const;
53 
55  virtual void feasibleRegion();
57  virtual CbcBranchingObject * createBranch(int way) ;
58 
60  inline int numberMembers() const
61  {return numberMembers_;}
62 
64  inline int numberLinks() const
65  {return numberLinks_;}
66 
68  inline const int * which() const
69  {return which_;}
70 
72  inline const double * weights() const
73  { return weights_;}
74 
75 private:
77 
79  double * weights_;
80 
86  int * which_;
88  int sosType_;
89 };
96 
97 public:
98 
99  // Default Constructor
101 
102  // Useful constructor
104  int way,
105  double separator);
106 
107  // Copy constructor
109 
110  // Assignment operator
112 
114  virtual CbcBranchingObject * clone() const;
115 
116  // Destructor
117  virtual ~CbcLinkBranchingObject ();
118 
120  virtual double branch();
121 
124  virtual void print();
126  virtual int type() const
127  { return -1;}
128 
138  (const CbcBranchingObject* brObj, const bool replaceIfOverlap = false);
139 private:
141  const CbcLink * set_;
143  double separator_;
144 };
145 #endif