#include <CoinWarmStartDual.hpp>
Inheritance diagram for CoinWarmStartDualDiff:
Public Member Functions | |
virtual CoinWarmStartDiff * | clone () const |
`Virtual constructor' | |
virtual CoinWarmStartDualDiff & | operator= (const CoinWarmStartDualDiff &rhs) |
Assignment. | |
virtual | ~CoinWarmStartDualDiff () |
Destructor. | |
Protected Member Functions | |
CoinWarmStartDualDiff () | |
Default constructor. | |
CoinWarmStartDualDiff (const CoinWarmStartDualDiff &rhs) | |
Copy constructor. | |
Private Member Functions | |
CoinWarmStartDualDiff (int sze, const unsigned int *const diffNdxs, const double *const diffVals) | |
Standard constructor. | |
Private Attributes | |
int | sze_ |
Number of entries (and allocated capacity), in units of double . | |
unsigned int * | diffNdxs_ |
Array of diff indices. | |
double * | diffVals_ |
Array of diff values. | |
Friends | |
CoinWarmStartDiff * | CoinWarmStartDual::generateDiff (const CoinWarmStart *const oldCWS) const |
void | CoinWarmStartDual::applyDiff (const CoinWarmStartDiff *const diff) |
This class exists in order to hide from the world the details of calculating and representing a `diff' between two CoinWarmStartDual objects. For convenience, assignment, cloning, and deletion are visible to the world, and default and copy constructors are made available to derived classes. Knowledge of the rest of this structure, and of generating and applying diffs, is restricted to the friend functions CoinWarmStartDual::generateDiff() and CoinWarmStartDual::applyDiff().
The actual data structure is a pair of vectors, diffNdxs_ and diffVals_.
Definition at line 120 of file CoinWarmStartDual.hpp.
|
Default constructor. This is protected (rather than private) so that derived classes can see it when they make their default constructor protected or private. Definition at line 144 of file CoinWarmStartDual.hpp. References diffNdxs_, diffVals_, and sze_. Referenced by clone().
|
|
Copy constructor. For convenience when copying objects containing CoinWarmStartDualDiff objects. But consider whether you should be using clone() to retain polymorphism. This is protected (rather than private) so that derived classes can see it when the make their copy constructor protected or private. Definition at line 135 of file CoinWarmStartDual.cpp. References diffNdxs_, diffVals_, and sze_.
00136 : sze_(rhs.sze_), 00137 diffNdxs_(0), 00138 diffVals_(0) 00139 { if (sze_ > 0) 00140 { diffNdxs_ = new unsigned int[sze_] ; 00141 memcpy(diffNdxs_,rhs.diffNdxs_,sze_*sizeof(unsigned int)) ; 00142 diffVals_ = new double[sze_] ; 00143 memcpy(diffVals_,rhs.diffVals_,sze_*sizeof(double)) ; } 00144 00145 return ; } |