source: trunk/Cbc/src/CbcCompare.hpp

Last change on this file was 2465, checked in by unxusr, 5 months ago

script to format sources

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 883 bytes
Line 
1/* $Id: CbcCompare.hpp 2465 2019-01-03 19:26:52Z forrest $ */
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
9class CbcCompareBase;
10
11class CbcCompare {
12public:
13  CbcCompareBase *test_;
14  // Default Constructor
15  CbcCompare()
16  {
17    test_ = NULL;
18  }
19
20  virtual ~CbcCompare() {}
21
22  bool operator()(CbcNode *x, CbcNode *y)
23  {
24    return test_->test(x, y);
25  }
26  bool compareNodes(CbcNode *x, CbcNode *y)
27  {
28    return test_->test(x, y);
29  }
30  /// This is alternate test function
31  inline bool alternateTest(CbcNode *x, CbcNode *y)
32  {
33    return test_->alternateTest(x, y);
34  }
35
36  /// return comparison object
37  inline CbcCompareBase *comparisonObject() const
38  {
39    return test_;
40  }
41};
42
43#endif
44
45/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
46*/
Note: See TracBrowser for help on using the repository browser.