#include <IndexSet.h>
|
void | init () |
|
void | init (const unsigned int &r_nb_indices) |
|
void | init (const unsigned int &r_nb_indices, const std::vector< int > &r_index) |
|
Definition at line 40 of file IndexSet.h.
◆ IndexSet() [1/3]
MuonCalib::IndexSet::IndexSet |
( |
| ) |
|
|
inline |
default constructor: the number of indices is set to 0
Definition at line 57 of file IndexSet.h.
◆ IndexSet() [2/3]
MuonCalib::IndexSet::IndexSet |
( |
const unsigned int & |
r_nb_indices | ) |
|
|
inline |
constructor: the number of indices is set to r_nb_indices
Definition at line 60 of file IndexSet.h.
◆ IndexSet() [3/3]
MuonCalib::IndexSet::IndexSet |
( |
const unsigned int & |
r_nb_indices, |
|
|
const std::vector< int > & |
r_index |
|
) |
| |
|
inline |
constructor: the number of indices is set to r_nb_indices, the vector r_index contains the indices
Definition at line 63 of file IndexSet.h.
◆ init() [1/3]
◆ init() [2/3]
void IndexSet::init |
( |
const unsigned int & |
r_nb_indices | ) |
|
|
private |
◆ init() [3/3]
void IndexSet::init |
( |
const unsigned int & |
r_nb_indices, |
|
|
const std::vector< int > & |
r_index |
|
) |
| |
|
private |
Definition at line 50 of file IndexSet.cxx.
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()) {
◆ operator!=()
comparison of two index sets; two index sets are considered equal if they are of the same size and their indices are the same at the same position [.
]
Definition at line 164 of file IndexSet.cxx.
164 {
return !(*
this == r_index_set); }
◆ operator==()
◆ operator[]() [1/2]
int IndexSet::operator[] |
( |
const unsigned int & |
r_k | ) |
|
◆ operator[]() [2/2]
int IndexSet::operator[] |
( |
const unsigned int & |
r_k | ) |
const |
access to the indices stored in the class, 0 <= r_k < size(); WARNING: no test on the index is performed
Definition at line 129 of file IndexSet.cxx.
◆ resize()
void IndexSet::resize |
( |
const unsigned int & |
r_size | ) |
|
resize the index set to r_size; the index store is preserved as far as possible
Definition at line 90 of file IndexSet.cxx.
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++) {
◆ size()
unsigned int IndexSet::size |
( |
| ) |
const |
◆ sort()
sort the indices in ascending order
Definition at line 137 of file IndexSet.cxx.
◆ m_index
std::vector<int> MuonCalib::IndexSet::m_index |
|
private |
◆ m_nb_indices
unsigned int MuonCalib::IndexSet::m_nb_indices |
|
private |
The documentation for this class was generated from the following files:
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.