source: trunk/Cbc/src/CbcCompare.hpp @ 1573

Last change on this file since 1573 was 1573, checked in by lou, 8 years ago

Change to EPL license notice.

File size: 934 bytes
RevLine 
[1357]1/* $Id: CbcCompare.hpp 1286 2009-11-09 23:33:07Z EdwinStraver $ */
2// Copyright (C) 2002, International Business Machines
3// Corporation and others.  All Rights Reserved.
[1573]4// This code is licensed under the terms of the Eclipse Public License (EPL).
5
[1357]6#ifndef CbcCompare_H
7#define CbcCompare_H
8
9class CbcCompareBase;
10
11class CbcCompare {
12public:
13    CbcCompareBase * test_;
14    // Default Constructor
15    CbcCompare () {
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    }
27    /// This is alternate test function
28    inline bool alternateTest (CbcNode * x, CbcNode * y) {
29        return test_->alternateTest(x, y);
30    }
31
32    /// return comparison object
33    inline CbcCompareBase * comparisonObject() const {
34        return test_;
35    }
36};
37
38#endif
39
Note: See TracBrowser for help on using the repository browser.