source: trunk/Cbc/src/CbcObjectUpdateData.cpp @ 2464

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

.clang-format with proposal for formatting code

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1// $Id: CbcObjectUpdateData.cpp 2464 2019-01-03 19:03:23Z unxusr $
2// Copyright (C) 2002, 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// Edwin 11/12/2009 carved from CbcBranchBase
7
8#if defined(_MSC_VER)
9// Turn off compiler warning about long names
10#pragma warning(disable : 4786)
11#endif
12#include <cassert>
13#include <cstdlib>
14#include <cmath>
15#include <cfloat>
16
17#include "OsiSolverInterface.hpp"
18#include "OsiSolverBranch.hpp"
19#include "OsiChooseVariable.hpp"
20#include "CbcModel.hpp"
21#include "CbcMessage.hpp"
22#include "CbcBranchBase.hpp"
23#include "CbcObjectUpdateData.hpp"
24
25// Default constructor
26CbcObjectUpdateData::CbcObjectUpdateData()
27  : object_(NULL)
28  , way_(0)
29  , objectNumber_(-1)
30  , change_(0.0)
31  , status_(0)
32  , intDecrease_(0)
33  , branchingValue_(0.0)
34  , originalObjective_(COIN_DBL_MAX)
35  , cutoff_(COIN_DBL_MAX)
36{
37}
38
39// Useful constructor
40CbcObjectUpdateData::CbcObjectUpdateData(CbcObject *object,
41  int way,
42  double change,
43  int status,
44  int intDecrease,
45  double branchingValue)
46  : object_(object)
47  , way_(way)
48  , objectNumber_(-1)
49  , change_(change)
50  , status_(status)
51  , intDecrease_(intDecrease)
52  , branchingValue_(branchingValue)
53  , originalObjective_(COIN_DBL_MAX)
54  , cutoff_(COIN_DBL_MAX)
55{
56}
57
58// Destructor
59CbcObjectUpdateData::~CbcObjectUpdateData()
60{
61}
62
63// Copy constructor
64CbcObjectUpdateData::CbcObjectUpdateData(const CbcObjectUpdateData &rhs)
65  : object_(rhs.object_)
66  , way_(rhs.way_)
67  , objectNumber_(rhs.objectNumber_)
68  , change_(rhs.change_)
69  , status_(rhs.status_)
70  , intDecrease_(rhs.intDecrease_)
71  , branchingValue_(rhs.branchingValue_)
72  , originalObjective_(rhs.originalObjective_)
73  , cutoff_(rhs.cutoff_)
74{
75}
76
77// Assignment operator
78CbcObjectUpdateData &
79CbcObjectUpdateData::operator=(const CbcObjectUpdateData &rhs)
80{
81  if (this != &rhs) {
82    object_ = rhs.object_;
83    way_ = rhs.way_;
84    objectNumber_ = rhs.objectNumber_;
85    change_ = rhs.change_;
86    status_ = rhs.status_;
87    intDecrease_ = rhs.intDecrease_;
88    branchingValue_ = rhs.branchingValue_;
89    originalObjective_ = rhs.originalObjective_;
90    cutoff_ = rhs.cutoff_;
91  }
92  return *this;
93}
Note: See TracBrowser for help on using the repository browser.