source: branches/sandbox/Cbc/src/CbcCompare.hpp @ 1357

Last change on this file since 1357 was 1357, checked in by coin, 9 years ago

run 'astyle -A4 -p' and dos2unix

File size: 855 bytes
Line 
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.
4#ifndef CbcCompare_H
5#define CbcCompare_H
6
7class CbcCompareBase;
8
9class CbcCompare {
10public:
11    CbcCompareBase * test_;
12    // Default Constructor
13    CbcCompare () {
14        test_ = NULL;
15    }
16
17    virtual ~CbcCompare() {}
18
19    bool operator() (CbcNode * x, CbcNode * y) {
20        return test_->test(x, y);
21    }
22    bool compareNodes (CbcNode * x, CbcNode * y) {
23        return test_->test(x, y);
24    }
25    /// This is alternate test function
26    inline bool alternateTest (CbcNode * x, CbcNode * y) {
27        return test_->alternateTest(x, y);
28    }
29
30    /// return comparison object
31    inline CbcCompareBase * comparisonObject() const {
32        return test_;
33    }
34};
35
36#endif
37
Note: See TracBrowser for help on using the repository browser.