Cgl  0.60.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
CoinWarmStartBasisDiff Class Reference

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

#include <CoinWarmStartBasis.hpp>

+ Inheritance diagram for CoinWarmStartBasisDiff:
+ Collaboration diagram for CoinWarmStartBasisDiff:

Public Member Functions

virtual CoinWarmStartDiffclone () const
 `Virtual constructor' More...
virtual CoinWarmStartBasisDiffoperator= (const CoinWarmStartBasisDiff &rhs)
 Assignment. More...
virtual ~CoinWarmStartBasisDiff ()
 Destructor. More...
- Public Member Functions inherited from CoinWarmStartDiff
virtual ~CoinWarmStartDiff ()
 Abstract destructor. More...

Protected Member Functions

 CoinWarmStartBasisDiff ()
 Default constructor. More...
 CoinWarmStartBasisDiff (const CoinWarmStartBasisDiff &cwsbd)
 Copy constructor. More...
 CoinWarmStartBasisDiff (int sze, const unsigned int *const diffNdxs, const unsigned int *const diffVals)
 Standard constructor. More...
 CoinWarmStartBasisDiff (const CoinWarmStartBasis *rhs)
 Constructor when full is smaller than diff! More...

Private Attributes

int sze_
 Number of entries (and allocated capacity), in units of int. More...
unsigned int * difference_
 Array of diff indices and diff values. More...


CoinWarmStartDiffCoinWarmStartBasis::generateDiff (const CoinWarmStart *const oldCWS) const
void CoinWarmStartBasis::applyDiff (const CoinWarmStartDiff *const diff)

Detailed Description

A `diff' between two CoinWarmStartBasis objects.

This class exists in order to hide from the world the details of calculating and representing a `diff' between two CoinWarmStartBasis 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 CoinWarmStartBasis::generateDiff() and CoinWarmStartBasis::applyDiff().

The actual data structure is an unsigned int vector, difference_ which starts with indices of changed and then has values starting after sze_

This is a pretty generic structure, and vector diff is a pretty generic activity. We should be able to convert this to a template.
Using unsigned int as the data type for the diff vectors might help to contain the damage when this code is inevitably compiled for 64 bit architectures. But the notion of int as 4 bytes is hardwired into CoinWarmStartBasis, so changes are definitely required.

Definition at line 404 of file CoinWarmStartBasis.hpp.

Constructor & Destructor Documentation

virtual CoinWarmStartBasisDiff::~CoinWarmStartBasisDiff ( )


CoinWarmStartBasisDiff::CoinWarmStartBasisDiff ( )

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 426 of file CoinWarmStartBasis.hpp.

CoinWarmStartBasisDiff::CoinWarmStartBasisDiff ( const CoinWarmStartBasisDiff cwsbd)

Copy constructor.

For convenience when copying objects containing CoinWarmStartBasisDiff 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 they make their copy constructor protected or private.

CoinWarmStartBasisDiff::CoinWarmStartBasisDiff ( int  sze,
const unsigned int *const  diffNdxs,
const unsigned int *const  diffVals 

Standard constructor.

CoinWarmStartBasisDiff::CoinWarmStartBasisDiff ( const CoinWarmStartBasis rhs)

Constructor when full is smaller than diff!

Member Function Documentation

virtual CoinWarmStartDiff* CoinWarmStartBasisDiff::clone ( ) const

`Virtual constructor'

Implements CoinWarmStartDiff.

Definition at line 407 of file CoinWarmStartBasis.hpp.

virtual CoinWarmStartBasisDiff& CoinWarmStartBasisDiff::operator= ( const CoinWarmStartBasisDiff rhs)


Friends And Related Function Documentation

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

Member Data Documentation

int CoinWarmStartBasisDiff::sze_

Number of entries (and allocated capacity), in units of int.

Definition at line 458 of file CoinWarmStartBasis.hpp.

unsigned int* CoinWarmStartBasisDiff::difference_

Array of diff indices and diff values.

Definition at line 462 of file CoinWarmStartBasis.hpp.

The documentation for this class was generated from the following file: