Auxiliary data structure for randomisation of indices.
More...
#include <JRandomTimeslice.hh>
Auxiliary data structure for randomisation of indices.
Definition at line 167 of file JRandomTimeslice.hh.
◆ random_indices_t()
| KM3NETDAQ::JRandomTimeslice::random_indices_t::random_indices_t |
( |
const size_t | N | ) |
|
|
inline |
◆ random_shuffle() [1/2]
| void KM3NETDAQ::JRandomTimeslice::random_indices_t::random_shuffle |
( |
const std::set< size_t > & | keep | ) |
|
|
inline |
Randomly shuffle values between fixed indices.
- Parameters
-
Definition at line 184 of file JRandomTimeslice.hh.
185 {
186 for (size_t i = 0; i != this->size(); ++i) {
187 (*this)[i] = i;
188 }
189
191
192 for (
const size_t i2 :
keep) {
193
195
197 }
198
200 }
Template definition of a multi-dimensional oscillation probability interpolation table.
void random_shuffle(const std::set< size_t > &keep)
Randomly shuffle values between fixed indices.
◆ random_shuffle() [2/2]
Randomly shuffle values between given indices.
- Parameters
-
| i1 | first index (included) |
| i2 | last index (excluded) |
Definition at line 209 of file JRandomTimeslice.hh.
210 {
211 for (
int i =
i2 - 1; i >
i1; --i) {
212
214
215 std::swap((*
this)[i], (*
this)[
l]);
216 }
217 }
The documentation for this struct was generated from the following file: