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

Last change on this file since 1290 was 1290, checked in by bjarni, 11 years ago

Extract classes CbcCompare? and CbcChooseVariable? from CbcCompareBase?.hpp to their own .hpp files

File size: 900 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
7#include "CbcCompareBase.hpp"
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.