source: stable/2.6/Cbc/src/CbcFathom.cpp @ 2122

Last change on this file since 2122 was 1432, checked in by bjarni, 10 years ago

Added extra return at end of each source file where needed, to remove possible linefeed conflicts (NightlyBuild? errors)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/* $Id: CbcFathom.cpp 1432 2010-02-07 19:33:53Z forrest $ */
2// Copyright (C) 2004, International Business Machines
3// Corporation and others.  All Rights Reserved.
4#if defined(_MSC_VER)
5// Turn off compiler warning about long names
6#  pragma warning(disable:4786)
7#endif
8#include <cassert>
9#include <cstdlib>
10#include <cmath>
11#include <cfloat>
12
13#ifdef COIN_HAS_CLP
14#include "OsiClpSolverInterface.hpp"
15#endif
16#include "CbcModel.hpp"
17#include "CbcMessage.hpp"
18#include "CbcFathom.hpp"
19
20// Default Constructor
21CbcFathom::CbcFathom()
22        : model_(NULL),
23        possible_(false)
24{
25}
26
27// Constructor from model
28CbcFathom::CbcFathom(CbcModel & model)
29        :
30        model_(&model),
31        possible_(false)
32{
33}
34// Resets stuff if model changes
35void
36CbcFathom::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//-------------------------------------------------------------------
77// Copy constructor
78//-------------------------------------------------------------------
79CbcOsiSolver::CbcOsiSolver (
80    const CbcOsiSolver & rhs)
81        : OsiSolverInterface(), // 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
Note: See TracBrowser for help on using the repository browser.