CoinPartitionedVector
CoinPartitionedVector class documentation
Inheritance
Inherits from: CoinIndexedVector
Public Methods
getNumElements
Get the size of a partition.
int getNumElements(int partition)
Parameters:
partition(int)
getNumPartitions
Get number of partitions.
int getNumPartitions()
getNumElements
Get the size.
int getNumElements()
startPartition
Get starts.
int startPartition(int partition)
Parameters:
partition(int)
startPartitions
Get starts.
const int * startPartitions()
setNumElementsPartition
Set the size of a partition.
void setNumElementsPartition(int partition, int value)
Parameters:
partition(int)value(int)
setTempNumElementsPartition
Set the size of a partition (just for a tiny while)
void setTempNumElementsPartition(int partition, int value)
Parameters:
partition(int)value(int)
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:
n(int)
setPartitions
Setup partitions (needs end as well)
void setPartitions(int number, const int * starts)
Parameters:
number(int)starts(const int *)
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:
partition(int)
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:
partition(int)tolerance(double)
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:
size(int)inds(const int *)elems(const double *)
CoinPartitionedVector
Alternate Constructors - set elements to same scalar value.
CoinPartitionedVector(int size, const int * inds, double element)
Parameters:
size(int)inds(const int *)element(double)
CoinPartitionedVector
Alternate Constructors - construct full storage with indices 0 through size-1.
CoinPartitionedVector(int size, const double * elements)
Parameters:
size(int)elements(const double *)
CoinPartitionedVector
Alternate Constructors - just size.
CoinPartitionedVector(int size)
Parameters:
size(int)
CoinPartitionedVector
Copy constructor.
CoinPartitionedVector(const CoinPartitionedVector & )
Parameters:
- `` (const CoinPartitionedVector &)
CoinPartitionedVector
Copy constructor.2.
CoinPartitionedVector(const CoinPartitionedVector * )
Parameters:
- `` (const CoinPartitionedVector *)
operator=
Assignment operator.
CoinPartitionedVector & operator=(const CoinPartitionedVector & )
Parameters:
- `` (const CoinPartitionedVector &)
~CoinPartitionedVector
Destructor.
~CoinPartitionedVector()
Source
Header: layer-0/CoinUtils/src/CoinIndexedVector.hpp