CoinPartitionedVector

CoinPartitionedVector class documentation

Inheritance

Inherits from: CoinIndexedVector

Public Methods

getNumElements

Get the size of a partition.

int getNumElements(int partition)

Parameters:

getNumPartitions

Get number of partitions.

int getNumPartitions()

getNumElements

Get the size.

int getNumElements()

startPartition

Get starts.

int startPartition(int partition)

Parameters:

startPartitions

Get starts.

const int * startPartitions()

setNumElementsPartition

Set the size of a partition.

void setNumElementsPartition(int partition, int value)

Parameters:

setTempNumElementsPartition

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

void setTempNumElementsPartition(int partition, int value)

Parameters:

computeNumberElements

Add up number of elements in partitions.

void computeNumberElements()

compact

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

void compact()

reserve

Reserve space.

void reserve(int n)

Parameters:

setPartitions

Setup partitions (needs end as well)

void setPartitions(int number, const int * starts)

Parameters:

clearAndReset

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

void clearAndReset()

clearAndKeep

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

void clearAndKeep()

clearPartition

Clear a partition.

void clearPartition(int partition)

Parameters:

checkClear

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

void checkClear()

checkClean

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

void checkClean()

scan

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

int scan(int partition, double tolerance = 0.0)

Parameters:

print

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

void print()

sort

Sort the indexed storage vector (increasing indices).

void sort()

CoinPartitionedVector

Default constructor.

 CoinPartitionedVector()

CoinPartitionedVector

Alternate Constructors - set elements to vector of doubles.

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

Parameters:

CoinPartitionedVector

Alternate Constructors - set elements to same scalar value.

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

Parameters:

CoinPartitionedVector

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

 CoinPartitionedVector(int size, const double * elements)

Parameters:

CoinPartitionedVector

Alternate Constructors - just size.

 CoinPartitionedVector(int size)

Parameters:

CoinPartitionedVector

Copy constructor.

 CoinPartitionedVector(const CoinPartitionedVector & )

Parameters:

CoinPartitionedVector

Copy constructor.2.

 CoinPartitionedVector(const CoinPartitionedVector * )

Parameters:

operator=

Assignment operator.

CoinPartitionedVector & operator=(const CoinPartitionedVector & )

Parameters:

~CoinPartitionedVector

Destructor.

 ~CoinPartitionedVector()

Source

Header: layer-0/CoinUtils/src/CoinIndexedVector.hpp