# CoinWarmStartBasisDiff Class Reference

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

`#include <CoinWarmStartBasis.hpp>`

Inheritance diagram for CoinWarmStartBasisDiff:
[legend]
Collaboration diagram for CoinWarmStartBasisDiff:
[legend]

List of all members.

## Public Member Functions
virtual CoinWarmStartDiff * | clone () const
| `Virtual constructor'
virtual CoinWarmStartBasisDiff & | operator= (const CoinWarmStartBasisDiff &rhs)
| Assignment.
virtual | ~CoinWarmStartBasisDiff ()
| Destructor.
## Protected Member Functions
| CoinWarmStartBasisDiff ()
| Default constructor.
| CoinWarmStartBasisDiff (const CoinWarmStartBasisDiff &cwsbd)
| Copy constructor.
| CoinWarmStartBasisDiff (int sze, const unsigned int *const diffNdxs, const unsigned int *const diffVals)
| Standard constructor.
| CoinWarmStartBasisDiff (const CoinWarmStartBasis *rhs)
| Constructor when full is smaller than diff!
## Private Attributes
int | sze_
| Number of entries (and allocated capacity), in units of `int`.
unsigned int * | difference_
| Array of diff indices and diff values.
## Friends
CoinWarmStartDiff * | CoinWarmStartBasis::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_

Todo:
  This is a pretty generic structure, and vector diff is a pretty generic activity. We should be able to convert this to a template.

Todo:
  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 395 of file CoinWarmStartBasis.hpp.

## Constructor & Destructor Documentation

virtual CoinWarmStartBasisDiff::~CoinWarmStartBasisDiff | ( |  | ) | `[virtual]`

Destructor.

CoinWarmStartBasisDiff::CoinWarmStartBasisDiff | ( |  | ) | `[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 418 of file CoinWarmStartBasis.hpp.

CoinWarmStartBasisDiff::CoinWarmStartBasisDiff | ( | const CoinWarmStartBasisDiff & | cwsbd | ) | `[protected]`

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 |
| ) |  |  | `[protected]`

Standard constructor.

CoinWarmStartBasisDiff::CoinWarmStartBasisDiff | ( | const CoinWarmStartBasis * | rhs | ) | `[protected]`

Constructor when full is smaller than diff!

## Member Function Documentation

virtual CoinWarmStartDiff* CoinWarmStartBasisDiff::clone | ( |  | ) | const`[inline, virtual]`

`Virtual constructor'

Implements CoinWarmStartDiff.

Definition at line 399 of file CoinWarmStartBasis.hpp.

virtual CoinWarmStartBasisDiff& CoinWarmStartBasisDiff::operator= | ( | const CoinWarmStartBasisDiff & | rhs | ) | `[virtual]`

Assignment.

## Friends And Related Function Documentation

CoinWarmStartDiff* CoinWarmStartBasis::generateDiff | ( | const CoinWarmStart *const | oldCWS | ) | const`[friend]`

void CoinWarmStartBasis::applyDiff | ( | const CoinWarmStartDiff *const | diff | ) | `[friend]`

## Member Data Documentation

int CoinWarmStartBasisDiff::sze_`[private]`

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

Definition at line 447 of file CoinWarmStartBasis.hpp.

unsigned int* CoinWarmStartBasisDiff::difference_`[private]`

Array of diff indices and diff values.

Definition at line 451 of file CoinWarmStartBasis.hpp.

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

- /home/coin/svn-release/Alps-1.5.0/CoinUtils/src/CoinWarmStartBasis.hpp