Changeset 2464 for trunk/Cbc/src/CbcBranchingObject.cpp
 Timestamp:
 Jan 3, 2019 2:03:23 PM (10 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Cbc/src/CbcBranchingObject.cpp
r1899 r2464 8 8 #if defined(_MSC_VER) 9 9 // Turn off compiler warning about long names 10 # pragma warning(disable:4786)10 #pragma warning(disable : 4786) 11 11 #endif 12 12 #include <cassert> … … 22 22 #include "CbcBranchBase.hpp" 23 23 24 25 24 // Default Constructor 26 25 CbcBranchingObject::CbcBranchingObject() 27 26 : OsiBranchingObject() 28 27 { 29 30 31 32 28 model_ = NULL; 29 originalCbcObject_ = NULL; 30 variable_ = 1; 31 way_ = 0; 33 32 } 34 33 35 34 // Useful constructor 36 CbcBranchingObject::CbcBranchingObject (CbcModel * model, int variable, int way, double value)37 35 CbcBranchingObject::CbcBranchingObject(CbcModel *model, int variable, int way, double value) 36 : OsiBranchingObject(model>solver(), value) 38 37 { 39 40 41 42 38 model_ = model; 39 originalCbcObject_ = NULL; 40 variable_ = variable; 41 way_ = way; 43 42 } 44 43 45 44 // Copy constructor 46 CbcBranchingObject::CbcBranchingObject ( const CbcBranchingObject &rhs)47 45 CbcBranchingObject::CbcBranchingObject(const CbcBranchingObject &rhs) 46 : OsiBranchingObject(rhs) 48 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 56 CbcBranchingObject & 57 CbcBranchingObject::operator=(const CbcBranchingObject &rhs) 58 { 59 if (this != &rhs) { 60 OsiBranchingObject::operator=(rhs); 49 61 model_ = rhs.model_; 50 62 originalCbcObject_ = rhs.originalCbcObject_; 51 63 variable_ = rhs.variable_; 52 64 way_ = rhs.way_; 53 value_ = rhs.value_; 54 } 55 56 // Assignment operator 57 CbcBranchingObject & 58 CbcBranchingObject::operator=( const CbcBranchingObject & rhs) 59 { 60 if (this != &rhs) { 61 OsiBranchingObject::operator=(rhs); 62 model_ = rhs.model_; 63 originalCbcObject_ = rhs.originalCbcObject_; 64 variable_ = rhs.variable_; 65 way_ = rhs.way_; 66 } 67 return *this; 65 } 66 return *this; 68 67 } 69 68 70 69 // Destructor 71 CbcBranchingObject::~CbcBranchingObject 70 CbcBranchingObject::~CbcBranchingObject() 72 71 { 73 72 } 74
Note: See TracChangeset
for help on using the changeset viewer.