/home/coin/SVN-release/CoinAll-1.1.0/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);
00035   CbcLink (CbcModel * model, int numberMembers,
00036            int numberLinks, int typeSOS, const int * which,
00037            const double * weights, int setNumber);
00038   
00039   // Copy constructor 
00040   CbcLink ( const CbcLink &);
00041    
00043   virtual CbcObject * clone() const;
00044 
00045   // Assignment operator 
00046   CbcLink & operator=( const CbcLink& rhs);
00047 
00048   // Destructor 
00049   ~CbcLink ();
00050   
00052   virtual double infeasibility(int & preferredWay) const;
00053 
00055   virtual void feasibleRegion();
00057   virtual CbcBranchingObject * createBranch(int way) ;
00058 
00060   inline int numberMembers() const
00061   {return numberMembers_;}
00062 
00064   inline int numberLinks() const
00065   {return numberLinks_;}
00066 
00068   inline const int * which() const
00069   {return which_;}
00070 
00072   inline const double * weights() const
00073   { return weights_;}
00074 
00075 private:
00077 
00079   double * weights_;
00080 
00082   int numberMembers_;
00084    int numberLinks_;
00086   int * which_;
00088   int sosType_;
00089 };
00095 class CbcLinkBranchingObject : public CbcBranchingObject {
00096 
00097 public:
00098 
00099   // Default Constructor 
00100   CbcLinkBranchingObject ();
00101 
00102   // Useful constructor
00103   CbcLinkBranchingObject (CbcModel * model,  const CbcLink * set,
00104                           int way,
00105                           double separator);
00106   
00107   // Copy constructor 
00108   CbcLinkBranchingObject ( const CbcLinkBranchingObject &);
00109    
00110   // Assignment operator 
00111   CbcLinkBranchingObject & operator=( const CbcLinkBranchingObject& rhs);
00112 
00114   virtual CbcBranchingObject * clone() const;
00115 
00116   // Destructor 
00117   virtual ~CbcLinkBranchingObject ();
00118   
00120   virtual double branch();
00121 
00124   virtual void print();
00125 private:
00127   const CbcLink * set_;
00129   double separator_;
00130 };
00131 #endif

Generated on Sun Nov 14 14:06:30 2010 for Coin-All by  doxygen 1.4.7