Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

CoinWarmStartDualDiff Class Reference

A `diff' between two CoinWarmStartDual objects. More...

#include <CoinWarmStartDual.hpp>

Inheritance diagram for CoinWarmStartDualDiff:

CoinWarmStartDiff List of all members.

Public Member Functions

virtual CoinWarmStartDiffclone () const
 `Virtual constructor'

virtual CoinWarmStartDualDiffoperator= (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

CoinWarmStartDiffCoinWarmStartDual::generateDiff (const CoinWarmStart *const oldCWS) const
void CoinWarmStartDual::applyDiff (const CoinWarmStartDiff *const diff)

Detailed Description

A `diff' between two CoinWarmStartDual objects.

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.


Constructor & Destructor Documentation

CoinWarmStartDualDiff::CoinWarmStartDualDiff  )  [inline, protected]
 

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().

00144 : sze_(0), diffNdxs_(0), diffVals_(NULL) {} ;

CoinWarmStartDualDiff::CoinWarmStartDualDiff const CoinWarmStartDualDiff rhs  )  [protected]
 

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 ; }


The documentation for this class was generated from the following files:
Generated on Wed Dec 3 14:34:30 2003 for Coin by doxygen 1.3.5