# CbcBranchLink.hpp

Go to the documentation of this file.

    00001 // $Id: CbcBranchLink.hpp 1574 2011-01-05 01:13:55Z lou $
    00002 // Copyright (C) 2005, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004 // This code is licensed under the terms of the Eclipse Public License (EPL).
    00005
    00006 #ifndef CbcBranchLink_H
    00007 #define CbcBranchLink_H
    00008
    00009 #include "CbcBranchBase.hpp"
    00010
    00016 class CbcLink : public CbcObject {
    00017
    00018 public:
    00019
    00020   // Default Constructor
    00021   CbcLink ();
    00022
    00029   CbcLink (CbcModel * model, int numberMembers,
    00030            int numberLinks, int first,
    00031            const double * weights, int setNumber);
    00038   CbcLink (CbcModel * model, int numberMembers,
    00039            int numberLinks, int typeSOS, const int * which,
    00040            const double * weights, int setNumber);
    00041
    00042   // Copy constructor
    00043   CbcLink ( const CbcLink &);
    00044
    00046   virtual CbcObject * clone() const;
    00047
    00048   // Assignment operator
    00049   CbcLink & operator=( const CbcLink& rhs);
    00050
    00051   // Destructor
    00052   ~CbcLink ();
    00053
    00055   virtual double infeasibility(int & preferredWay) const;
    00056
    00058   virtual void feasibleRegion();
    00060   virtual CbcBranchingObject * createBranch(int way) ;
    00061
    00063   inline int numberMembers() const
    00064   {return numberMembers_;}
    00065
    00067   inline int numberLinks() const
    00068   {return numberLinks_;}
    00069
    00071   inline const int * which() const
    00072   {return which_;}
    00073
    00075   inline const double * weights() const
    00076   { return weights_;}
    00077
    00078 private:
    00080
    00082   double * weights_;
    00083
    00085   int numberMembers_;
    00087    int numberLinks_;
    00089   int * which_;
    00091   int sosType_;
    00092 };
    00098 class CbcLinkBranchingObject : public CbcBranchingObject {
    00099
    00100 public:
    00101
    00102   // Default Constructor
    00103   CbcLinkBranchingObject ();
    00104
    00105   // Useful constructor
    00106   CbcLinkBranchingObject (CbcModel * model,  const CbcLink * set,
    00107                           int way,
    00108                           double separator);
    00109
    00110   // Copy constructor
    00111   CbcLinkBranchingObject ( const CbcLinkBranchingObject &);
    00112
    00113   // Assignment operator
    00114   CbcLinkBranchingObject & operator=( const CbcLinkBranchingObject& rhs);
    00115
    00117   virtual CbcBranchingObject * clone() const;
    00118
    00119   // Destructor
    00120   virtual ~CbcLinkBranchingObject ();
    00121
    00123   virtual double branch();
    00124
    00127   virtual void print();
    00129   virtual CbcBranchObjType type() const
    00130   { return CbcBranchObjType(0);} /*FIXME what type() should be returned here? */
    00131
    00140   virtual CbcRangeCompare compareBranchingObject
    00141   (const CbcBranchingObject* brObj, const bool replaceIfOverlap = false);
    00142 private:
    00144   const CbcLink * set_;
    00146   double separator_;
    00147 };
    00148 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines