source: branches/devel/Clp/src/ClpConstraint.cpp @ 997

Last change on this file since 997 was 997, checked in by forrest, 13 years ago

for nonlinear

File size: 1.6 KB
Line 
1// Copyright (C) 2007, International Business Machines
2// Corporation and others.  All Rights Reserved.
3
4#include "CoinPragma.hpp"
5#include "ClpSimplex.hpp"
6#include "ClpConstraint.hpp"
7
8//#############################################################################
9// Constructors / Destructor / Assignment
10//#############################################################################
11
12//-------------------------------------------------------------------
13// Default Constructor
14//-------------------------------------------------------------------
15ClpConstraint::ClpConstraint () :
16  lastGradient_(NULL),
17  functionValue_(0.0),
18  type_(-1),
19  rowNumber_(-1)
20{
21
22}
23
24//-------------------------------------------------------------------
25// Copy constructor
26//-------------------------------------------------------------------
27ClpConstraint::ClpConstraint (const ClpConstraint & source) :
28  lastGradient_(NULL),
29  functionValue_(source.functionValue_),
30  type_(source.type_),
31  rowNumber_(source.rowNumber_)
32{ 
33
34}
35
36//-------------------------------------------------------------------
37// Destructor
38//-------------------------------------------------------------------
39ClpConstraint::~ClpConstraint ()
40{
41  delete [] lastGradient_;
42
43}
44
45//----------------------------------------------------------------
46// Assignment operator
47//-------------------------------------------------------------------
48ClpConstraint &
49ClpConstraint::operator=(const ClpConstraint& rhs)
50{
51  if (this != &rhs) {
52    functionValue_ = rhs.functionValue_;
53    type_ = rhs.type_;
54    rowNumber_= rhs.rowNumber_;
55    delete [] lastGradient_;
56    lastGradient_ = NULL;
57  }
58  return *this;
59}
60
Note: See TracBrowser for help on using the repository browser.