#include <ClpLinearObjective.hpp>
Inheritance diagram for ClpLinearObjective:
Public Member Functions | |
Stuff | |
virtual double * | gradient (const double *solution, double &offset, bool refresh) |
virtual void | resize (int newNumberColumns) |
Resize objective. | |
virtual void | deleteSome (int numberToDelete, const int *which) |
Delete columns in objective. | |
Constructors and destructors | |
ClpLinearObjective () | |
Default Constructor. | |
ClpLinearObjective (const double *objective, int numberColumns) | |
Constructor from objective. | |
ClpLinearObjective (const ClpLinearObjective &) | |
Copy constructor. | |
ClpLinearObjective (const ClpLinearObjective &rhs, int numberColumns, const int *whichColumns) | |
ClpLinearObjective & | operator= (const ClpLinearObjective &rhs) |
Assignment operator. | |
virtual | ~ClpLinearObjective () |
Destructor. | |
virtual ClpObjective * | clone () const |
Clone. | |
virtual ClpObjective * | subsetClone (int numberColumns, const int *whichColumns) const |
Private Attributes | |
Private member data | |
Objective | |
double * | objective_ |
int | numberColumns_ |
number of columns |
Definition at line 14 of file ClpLinearObjective.hpp.
|
Subset constructor. Duplicates are allowed and order is as given. Definition at line 58 of file ClpLinearObjective.cpp. References numberColumns_, and objective_.
00061 : ClpObjective(rhs) 00062 { 00063 objective_=NULL; 00064 numberColumns_=0; 00065 if (numberColumns>0) { 00066 // check valid lists 00067 int numberBad=0; 00068 int i; 00069 for (i=0;i<numberColumns;i++) 00070 if (whichColumn[i]<0||whichColumn[i]>=rhs.numberColumns_) 00071 numberBad++; 00072 if (numberBad) 00073 throw CoinError("bad column list", "subset constructor", 00074 "ClpLinearObjective"); 00075 numberColumns_ = numberColumns; 00076 objective_ = new double[numberColumns_]; 00077 for (i=0;i<numberColumns_;i++) 00078 objective_[i]=rhs.objective_[whichColumn[i]]; 00079 } 00080 } |
|
Returns gradient. If Linear then solution may be NULL, also returns an offset (to be added to current one) If refresh is false then uses last solution Implements ClpObjective. Definition at line 112 of file ClpLinearObjective.cpp.
00113 {
00114 offset=0.0;
00115 return objective_;
00116 }
|
|
Subset clone. Duplicates are allowed and order is as given. Reimplemented from ClpObjective. Definition at line 129 of file ClpLinearObjective.cpp. References ClpLinearObjective().
00131 { 00132 return new ClpLinearObjective(*this, numberColumns, whichColumns); 00133 } |