source: branches/sandbox/Cbc/src/CbcFathom.cpp @ 1286

Last change on this file since 1286 was 1286, checked in by EdwinStraver, 10 years ago

Changed formatting using AStyle -A4 -p

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