Cbc trunk
|
00001 // $Id$ 00002 // Copyright (C) 2002, 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 //Edwin 11/25/09 carved out of CbcCompareActual 00007 00008 #ifndef CbcCompareObjective_H 00009 #define CbcCompareObjective_H 00010 00011 00012 //############################################################################# 00013 /* These are alternative strategies for node traversal. 00014 They can take data etc for fine tuning 00015 00016 At present the node list is stored as a heap and the "test" 00017 comparison function returns true if node y is better than node x. 00018 00019 */ 00020 #include "CbcNode.hpp" 00021 #include "CbcCompareBase.hpp" 00022 #include "CbcCompare.hpp" 00023 00024 class CbcModel; 00025 00026 class CbcCompareObjective : public CbcCompareBase { 00027 public: 00028 // Default Constructor 00029 CbcCompareObjective (); 00030 00031 virtual ~CbcCompareObjective(); 00032 // Copy constructor 00033 CbcCompareObjective ( const CbcCompareObjective &rhs); 00034 00035 // Assignment operator 00036 CbcCompareObjective & operator=( const CbcCompareObjective& rhs); 00037 00039 virtual CbcCompareBase * clone() const; 00041 virtual void generateCpp( FILE * fp); 00042 00043 /* This returns true if objective value of node y is less than 00044 objective value of node x */ 00045 virtual bool test (CbcNode * x, CbcNode * y); 00046 }; 00047 00048 #endif //CbcCompareObjective_H 00049