source: trunk/Cbc/src/CbcFathom.cpp

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

script to format sources

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