# CoinPartitionedVector Class Reference

`#include <CoinIndexedVector.hpp>`

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

List of all members.

## Public Member Functions
Get methods.
int | getNumElements (int partition) const
| Get the size of a partition.
int | getNumPartitions () const
| Get number of partitions.
int | getNumElements () const
| Get the size.
int | startPartition (int partition) const
| Get starts.
const int * | startPartitions () const
| Get starts.
Set methods
void | setNumElementsPartition (int partition, int value)
| Set the size of a partition.
void | setTempNumElementsPartition (int partition, int value)
| Set the size of a partition (just for a tiny while).
void | computeNumberElements ()
| Add up number of elements in partitions.
void | compact ()
| Add up number of elements in partitions and pack and get rid of partitions.
void | reserve (int n)
| Reserve space.
void | setPartitions (int number, const int *starts)
| Setup partitions (needs end as well).
void | clearAndReset ()
| Reset the vector (as if were just created an empty vector). Gets rid of partitions.
void | clearAndKeep ()
| Reset the vector (as if were just created an empty vector). Keeps partitions.
void | clearPartition (int partition)
| Clear a partition.
void | checkClear ()
| For debug check vector is clear i.e. no elements.
void | checkClean ()
| For debug check vector is clean i.e. elements match indices.
int | scan (int partition, double tolerance=0.0)
| Scan dense region and set up indices (returns number found).
void | print () const
| Scan dense region from start to < end and set up indices returns number found.
Sorting
void | sort ()
| Sort the indexed storage vector (increasing indices).
Constructors and destructors (not all wriiten)
| CoinPartitionedVector ()
| Default constructor.
| CoinPartitionedVector (int size, const int *inds, const double *elems)
| Alternate Constructors - set elements to vector of doubles.
| CoinPartitionedVector (int size, const int *inds, double element)
| Alternate Constructors - set elements to same scalar value.
| CoinPartitionedVector (int size, const double *elements)
| Alternate Constructors - construct full storage with indices 0 through size-1.
| CoinPartitionedVector (int size)
| Alternate Constructors - just size.
| CoinPartitionedVector (const CoinPartitionedVector &)
| Copy constructor.
| CoinPartitionedVector (const CoinPartitionedVector *)
| Copy constructor.2.
CoinPartitionedVector & | operator= (const CoinPartitionedVector &)
| Assignment operator.
| ~CoinPartitionedVector ()
| Destructor.
## Protected Attributes
Private member data
int | startPartition_ [COIN_PARTITIONS+1]
| Starts.
int | numberElementsPartition_ [COIN_PARTITIONS]
| Size of indices in a partition.
int | numberPartitions_
| Number of partitions (0 means off).

## Detailed Description

Definition at line 1057 of file CoinIndexedVector.hpp.

## Constructor & Destructor Documentation

CoinPartitionedVector::CoinPartitionedVector | ( |  | ) |

Default constructor.

CoinPartitionedVector::CoinPartitionedVector | ( | int | size,
|  | const int * | inds,
|  | const double * | elems |
| ) |  |  |

Alternate Constructors - set elements to vector of doubles.

CoinPartitionedVector::CoinPartitionedVector | ( | int | size,
|  | const int * | inds,
|  | double | element |
| ) |  |  |

Alternate Constructors - set elements to same scalar value.

CoinPartitionedVector::CoinPartitionedVector | ( | int | size,
|  | const double * | elements |
| ) |  |  |

Alternate Constructors - construct full storage with indices 0 through size-1.

CoinPartitionedVector::CoinPartitionedVector | ( | int | size | ) |

Alternate Constructors - just size.

CoinPartitionedVector::CoinPartitionedVector | ( | const CoinPartitionedVector & |  | ) |

Copy constructor.

CoinPartitionedVector::CoinPartitionedVector | ( | const CoinPartitionedVector * |  | ) |

Copy constructor.2.

CoinPartitionedVector::~CoinPartitionedVector | ( |  | ) |

Destructor.

## Member Function Documentation

int CoinPartitionedVector::getNumElements | ( | int | partition | ) | const`[inline]`

Get the size of a partition.

Definition at line 1066 of file CoinIndexedVector.hpp.

int CoinPartitionedVector::getNumPartitions | ( |  | ) | const`[inline]`

Get number of partitions.

Definition at line 1069 of file CoinIndexedVector.hpp.

int CoinPartitionedVector::getNumElements | ( |  | ) | const`[inline]`

Get the size.

Reimplemented from CoinIndexedVector.

Definition at line 1072 of file CoinIndexedVector.hpp.

int CoinPartitionedVector::startPartition | ( | int | partition | ) | const`[inline]`

Get starts.

Definition at line 1074 of file CoinIndexedVector.hpp.

const int* CoinPartitionedVector::startPartitions | ( |  | ) | const`[inline]`

Get starts.

Definition at line 1077 of file CoinIndexedVector.hpp.

void CoinPartitionedVector::setNumElementsPartition | ( | int | partition,
|  | int | value |
| ) |  |  | `[inline]`

Set the size of a partition.

Definition at line 1087 of file CoinIndexedVector.hpp.

void CoinPartitionedVector::setTempNumElementsPartition | ( | int | partition,
|  | int | value |
| ) |  |  | `[inline]`

Set the size of a partition (just for a tiny while).

Definition at line 1090 of file CoinIndexedVector.hpp.

void CoinPartitionedVector::computeNumberElements | ( |  | ) |

Add up number of elements in partitions.

void CoinPartitionedVector::compact | ( |  | ) |

Add up number of elements in partitions and pack and get rid of partitions.

void CoinPartitionedVector::reserve | ( | int | n | ) |

Reserve space.

Reimplemented from CoinIndexedVector.

void CoinPartitionedVector::setPartitions | ( | int | number,
|  | const int * | starts |
| ) |  |  |

Setup partitions (needs end as well).

void CoinPartitionedVector::clearAndReset | ( |  | ) |

Reset the vector (as if were just created an empty vector). Gets rid of partitions.

void CoinPartitionedVector::clearAndKeep | ( |  | ) |

Reset the vector (as if were just created an empty vector). Keeps partitions.

void CoinPartitionedVector::clearPartition | ( | int | partition | ) |

Clear a partition.

void CoinPartitionedVector::checkClear | ( |  | ) |

For debug check vector is clear i.e. no elements.

Reimplemented from CoinIndexedVector.

void CoinPartitionedVector::checkClean | ( |  | ) |

For debug check vector is clean i.e. elements match indices.

Reimplemented from CoinIndexedVector.

int CoinPartitionedVector::scan | ( | int | partition,
|  | double | tolerance = `0.0` |
| ) |  |  |

Scan dense region and set up indices (returns number found).

void CoinPartitionedVector::print | ( |  | ) | const

Scan dense region from start to < end and set up indices returns number found.

Print out

Reimplemented from CoinIndexedVector.

void CoinPartitionedVector::sort | ( |  | ) |

Sort the indexed storage vector (increasing indices).

Reimplemented from CoinIndexedVector.

CoinPartitionedVector& CoinPartitionedVector::operator= | ( | const CoinPartitionedVector & |  | ) |

Assignment operator.

Reimplemented from CoinIndexedVector.

## Member Data Documentation

int CoinPartitionedVector::startPartition_[COIN_PARTITIONS+1]`[protected]`

Starts.

Definition at line 1157 of file CoinIndexedVector.hpp.

int CoinPartitionedVector::numberElementsPartition_[COIN_PARTITIONS]`[protected]`

Size of indices in a partition.

Definition at line 1159 of file CoinIndexedVector.hpp.

int CoinPartitionedVector::numberPartitions_`[protected]`

Number of partitions (0 means off).

Definition at line 1161 of file CoinIndexedVector.hpp.

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

- /home/coin/svn-release/Alps-1.5.2/CoinUtils/src/CoinIndexedVector.hpp