Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbcCompare.hpp
Go to the documentation of this file.
1 /* $Id: CbcCompare.hpp 1899 2013-04-09 18:12:08Z stefan $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 #ifndef CbcCompare_H
7 #define CbcCompare_H
8 
9 class CbcCompareBase;
10 
11 class CbcCompare {
12 public:
14  // Default Constructor
16  test_ = NULL;
17  }
18 
19  virtual ~CbcCompare() {}
20 
21  bool operator() (CbcNode * x, CbcNode * y) {
22  return test_->test(x, y);
23  }
24  bool compareNodes (CbcNode * x, CbcNode * y) {
25  return test_->test(x, y);
26  }
28  inline bool alternateTest (CbcNode * x, CbcNode * y) {
29  return test_->alternateTest(x, y);
30  }
31 
33  inline CbcCompareBase * comparisonObject() const {
34  return test_;
35  }
36 };
37 
38 #endif
39 
virtual bool test(CbcNode *, CbcNode *)
This is test function.
virtual ~CbcCompare()
Definition: CbcCompare.hpp:19
CbcCompareBase * test_
Definition: CbcCompare.hpp:13
bool compareNodes(CbcNode *x, CbcNode *y)
Definition: CbcCompare.hpp:24
CbcCompareBase * comparisonObject() const
return comparison object
Definition: CbcCompare.hpp:33
Information required while the node is live.
Definition: CbcNode.hpp:49
bool alternateTest(CbcNode *x, CbcNode *y)
This is alternate test function.
Definition: CbcCompare.hpp:28
bool operator()(CbcNode *x, CbcNode *y)
Definition: CbcCompare.hpp:21
virtual bool alternateTest(CbcNode *x, CbcNode *y)
This is alternate test function.