All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
DynamicSelector.cc File Reference
#include "DynamicSelector.h"
#include "../uScript/api.h"
#include <iostream>

Go to the source code of this file.

Functions

template<typename T >
void Increment (std::vector< unsigned > &indices, const std::vector< std::vector< T >> &lists)
 
bool NotZero (const std::vector< unsigned > &indices)
 

Function Documentation

template<typename T >
void Increment ( std::vector< unsigned > &  indices,
const std::vector< std::vector< T >> &  lists 
)

Definition at line 6 of file DynamicSelector.cc.

6  {
7  for (unsigned i = 0; i < indices.size(); i++) {
8  indices[i] += 1;
9  if (indices[i] == lists[i].size()) {
10  indices[i] = 0;
11  }
12  else {
13  break;
14  }
15  }
16 }
std::size_t size(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:561
bool NotZero ( const std::vector< unsigned > &  indices)

Definition at line 18 of file DynamicSelector.cc.

18  {
19  for (unsigned i = 0; i < indices.size(); i++) {
20  if (indices[i] != 0) return true;
21  }
22  return false;
23 }