| 1 | /* $Id: ClpObjective.cpp 1665 2011-01-04 17:55:54Z lou $ */ |
| 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 | #include "CoinPragma.hpp" |
| 7 | #include "ClpSimplex.hpp" |
| 8 | #include "ClpObjective.hpp" |
| 9 | |
| 10 | //############################################################################# |
| 11 | // Constructors / Destructor / Assignment |
| 12 | //############################################################################# |
| 13 | |
| 14 | //------------------------------------------------------------------- |
| 15 | // Default Constructor |
| 16 | //------------------------------------------------------------------- |
| 17 | ClpObjective::ClpObjective () : |
| 18 | offset_(0.0), |
| 19 | type_(-1), |
| 20 | activated_(1) |
| 21 | { |
| 22 | |
| 23 | } |
| 24 | |
| 25 | //------------------------------------------------------------------- |
| 26 | // Copy constructor |
| 27 | //------------------------------------------------------------------- |
| 28 | ClpObjective::ClpObjective (const ClpObjective & source) : |
| 29 | offset_(source.offset_), |
| 30 | type_(source.type_), |
| 31 | activated_(source.activated_) |
| 32 | { |
| 33 | |
| 34 | } |
| 35 | |
| 36 | //------------------------------------------------------------------- |
| 37 | // Destructor |
| 38 | //------------------------------------------------------------------- |
| 39 | ClpObjective::~ClpObjective () |
| 40 | { |
| 41 | |
| 42 | } |
| 43 | |
| 44 | //---------------------------------------------------------------- |
| 45 | // Assignment operator |
| 46 | //------------------------------------------------------------------- |
| 47 | ClpObjective & |
| 48 | ClpObjective::operator=(const ClpObjective& rhs) |
| 49 | { |
| 50 | if (this != &rhs) { |
| 51 | offset_ = rhs.offset_; |
| 52 | type_ = rhs.type_; |
| 53 | activated_ = rhs.activated_; |
| 54 | } |
| 55 | return *this; |
| 56 | } |
| 57 | /* Subset clone. Duplicates are allowed |
| 58 | and order is as given. |
| 59 | */ |
| 60 | ClpObjective * |
| 61 | ClpObjective::subsetClone (int, |
| 62 | const int * ) const |
| 63 | { |
| 64 | std::cerr << "subsetClone not supported - ClpObjective" << std::endl; |
| 65 | abort(); |
| 66 | return NULL; |
| 67 | } |
| 68 | /* Given a zeroed array sets nonlinear columns to 1. |
| 69 | Returns number of nonlinear columns |
| 70 | */ |
| 71 | int |
| 72 | ClpObjective::markNonlinear(char *) |
| 73 | { |
| 74 | return 0; |
| 75 | } |
| 76 | |