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

Last change on this file since 2464 was 2464, checked in by unxusr, 5 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: 1.6 KB
Line 
1// $Id: CbcBranchingObject.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
24// Default Constructor
25CbcBranchingObject::CbcBranchingObject()
26  : OsiBranchingObject()
27{
28  model_ = NULL;
29  originalCbcObject_ = NULL;
30  variable_ = -1;
31  way_ = 0;
32}
33
34// Useful constructor
35CbcBranchingObject::CbcBranchingObject(CbcModel *model, int variable, int way, double value)
36  : OsiBranchingObject(model->solver(), value)
37{
38  model_ = model;
39  originalCbcObject_ = NULL;
40  variable_ = variable;
41  way_ = way;
42}
43
44// Copy constructor
45CbcBranchingObject::CbcBranchingObject(const CbcBranchingObject &rhs)
46  : OsiBranchingObject(rhs)
47{
48  model_ = rhs.model_;
49  originalCbcObject_ = rhs.originalCbcObject_;
50  variable_ = rhs.variable_;
51  way_ = rhs.way_;
52  value_ = rhs.value_;
53}
54
55// Assignment operator
56CbcBranchingObject &
57CbcBranchingObject::operator=(const CbcBranchingObject &rhs)
58{
59  if (this != &rhs) {
60    OsiBranchingObject::operator=(rhs);
61    model_ = rhs.model_;
62    originalCbcObject_ = rhs.originalCbcObject_;
63    variable_ = rhs.variable_;
64    way_ = rhs.way_;
65  }
66  return *this;
67}
68
69// Destructor
70CbcBranchingObject::~CbcBranchingObject()
71{
72}
Note: See TracBrowser for help on using the repository browser.