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

Last change on this file since 1433 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)

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