/home/coin/SVN-release/Cbc-1.1.1/Cbc/examples/CbcBranchLink.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2005, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 #ifndef CbcBranchLink_H
00004 #define CbcBranchLink_H
00005 
00006 #include "CbcBranchBase.hpp"
00007 
00013 class CbcLink : public CbcObject {
00014 
00015 public:
00016 
00017   // Default Constructor 
00018   CbcLink ();
00019 
00026   CbcLink (CbcModel * model, int numberMembers,
00027            int numberLinks, int first,
00028            const double * weights, int setNumber);
00029   
00030   // Copy constructor 
00031   CbcLink ( const CbcLink &);
00032    
00034   virtual CbcObject * clone() const;
00035 
00036   // Assignment operator 
00037   CbcLink & operator=( const CbcLink& rhs);
00038 
00039   // Destructor 
00040   ~CbcLink ();
00041   
00043   virtual double infeasibility(int & preferredWay) const;
00044 
00046   virtual void feasibleRegion();
00048   virtual CbcBranchingObject * createBranch(int way) ;
00049 
00051   inline int numberMembers() const
00052   {return numberMembers_;};
00053 
00055   inline int numberLinks() const
00056   {return numberLinks_;};
00057 
00059   inline int first() const
00060   {return first_;};
00061 
00063   inline const double * weights() const
00064   { return weights_;};
00065 
00066 private:
00068 
00070   double * weights_;
00071 
00073   int numberMembers_;
00075    int numberLinks_;
00077   int first_;
00078 };
00084 class CbcLinkBranchingObject : public CbcBranchingObject {
00085 
00086 public:
00087 
00088   // Default Constructor 
00089   CbcLinkBranchingObject ();
00090 
00091   // Useful constructor
00092   CbcLinkBranchingObject (CbcModel * model,  const CbcLink * set,
00093                           int way,
00094                           double separator);
00095   
00096   // Copy constructor 
00097   CbcLinkBranchingObject ( const CbcLinkBranchingObject &);
00098    
00099   // Assignment operator 
00100   CbcLinkBranchingObject & operator=( const CbcLinkBranchingObject& rhs);
00101 
00103   virtual CbcBranchingObject * clone() const;
00104 
00105   // Destructor 
00106   virtual ~CbcLinkBranchingObject ();
00107   
00109   virtual double branch(bool normalBranch=false);
00110 
00113   virtual void print(bool normalBranch);
00114 private:
00116   const CbcLink * set_;
00118   double separator_;
00119 };
00120 #endif

Generated on Thu May 15 21:59:04 2008 by  doxygen 1.4.7