50void IndexSet::init(
const unsigned int& r_nb_indices,
const std::vector<int>& r_index) {
55 if (r_index.size() < r_nb_indices) {
56 throw std::runtime_error(Form(
"File: %s, Line: %d\nIndexSet::init() - Index vector too short!", __FILE__, __LINE__));
66 if (k < r_index.size()) {
95 std::vector<int> aux_index =
m_index;
102 m_index = std::vector<int>(r_size);
103 for (
unsigned int k = 0; k < r_size; k++) {
152 if (
m_index[k] != r_index_set[k]) {
return false; }
int operator[](const unsigned int &r_k)
:::::::::::::::::::::::
void sort()
sort the indices in ascending order
bool operator==(const IndexSet &r_index_set) const
unsigned int m_nb_indices
unsigned int size() const
get the number of indices
void resize(const unsigned int &r_size)
resize the index set to r_size; the index store is preserved as far as possible
IndexSet()
default constructor: the number of indices is set to 0
bool operator!=(const IndexSet &r_index_set) const
comparison of two index sets; two index sets are considered equal if they are of the same size and th...
std::vector< int > m_index
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
void stable_sort(DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > end)
Specialization of stable_sort for DataVector/List.