Auxiliary data structure for randomisation of indices.  
 More...
#include <JRandomTimeslice.hh>
Auxiliary data structure for randomisation of indices. 
Definition at line 166 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 183 of file JRandomTimeslice.hh.
  185         for (
size_t i = 0; i != this->size(); ++i) {
 
  191         for (
const size_t i2 : keep) {
 
void random_shuffle(const std::set< size_t > &keep)
Randomly shuffle values between fixed indices.
 
 
 
 
◆ random_shuffle() [2/2]
  
  
      
        
          | void KM3NETDAQ::JRandomTimeslice::random_indices_t::random_shuffle  | 
          ( | 
          const int  | 
          i1,  | 
         
        
           | 
           | 
          const int  | 
          i2  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineprivate   | 
  
 
Randomly shuffle values between given indices. 
- Parameters
 - 
  
    | i1 | first index (included)  | 
    | i2 | last index (excluded)  | 
  
   
Definition at line 208 of file JRandomTimeslice.hh.
  210         for (
int i = i2 - 1; i > i1; --i) {
 
  212           const int l = i1 + gRandom->Integer(i - i1);
 
  214           std::swap((*
this)[i], (*
this)[l]);
 
 
 
 
The documentation for this struct was generated from the following file: