source: trunk/Cbc/src/CbcFathom.cpp @ 904

Last change on this file since 904 was 904, checked in by ladanyi, 11 years ago

include cstdlib before cmath to get things to compile on AIX with xlC

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1// Copyright (C) 2004, International Business Machines
2// Corporation and others.  All Rights Reserved.
3#if defined(_MSC_VER)
4// Turn off compiler warning about long names
5#  pragma warning(disable:4786)
6#endif
7#include <cassert>
8#include <cstdlib>
9#include <cmath>
10#include <cfloat>
11
12#ifdef COIN_HAS_CLP
13#include "OsiClpSolverInterface.hpp"
14#endif
15#include "CbcModel.hpp"
16#include "CbcMessage.hpp"
17#include "CbcFathom.hpp"
18
19// Default Constructor
20CbcFathom::CbcFathom() 
21  :model_(NULL),
22   possible_(false)
23{
24}
25
26// Constructor from model
27CbcFathom::CbcFathom(CbcModel & model)
28:
29  model_(&model),
30  possible_(false)
31{
32}
33// Resets stuff if model changes
34void 
35CbcFathom::resetModel(CbcModel * model)
36{
37  model_=model;
38}
39
40// Destructor
41CbcFathom::~CbcFathom ()
42{
43}
44
45// update model
46void CbcFathom::setModel(CbcModel * model)
47{
48  model_ = model;
49}
50#ifdef COIN_HAS_CLP
51
52//#############################################################################
53// Constructors, destructors clone and assignment
54//#############################################################################
55
56//-------------------------------------------------------------------
57// Default Constructor
58//-------------------------------------------------------------------
59CbcOsiSolver::CbcOsiSolver ()
60  : OsiClpSolverInterface()
61{
62  cbcModel_ = NULL;
63}
64//-------------------------------------------------------------------
65// Clone
66//-------------------------------------------------------------------
67OsiSolverInterface * 
68CbcOsiSolver::clone(bool copyData) const
69{
70  assert (copyData);
71  return new CbcOsiSolver(*this);
72}
73
74
75//-------------------------------------------------------------------
76// Copy constructor
77//-------------------------------------------------------------------
78CbcOsiSolver::CbcOsiSolver (
79                  const CbcOsiSolver & rhs)
80  : OsiClpSolverInterface(rhs)
81{
82  cbcModel_ = rhs.cbcModel_;
83}
84
85//-------------------------------------------------------------------
86// Destructor
87//-------------------------------------------------------------------
88CbcOsiSolver::~CbcOsiSolver ()
89{
90}
91
92//-------------------------------------------------------------------
93// Assignment operator
94//-------------------------------------------------------------------
95CbcOsiSolver &
96CbcOsiSolver::operator=(const CbcOsiSolver& rhs)
97{
98  if (this != &rhs) { 
99    OsiClpSolverInterface::operator=(rhs);
100    cbcModel_ = rhs.cbcModel_;
101  }
102  return *this;
103}
104#endif
Note: See TracBrowser for help on using the repository browser.