OpenMS
GridSearch< TupleTypes > Class Template Reference

#include <OpenMS/MATH/MISC/GridSearch.h>

Collaboration diagram for GridSearch< TupleTypes >:
[legend]

Public Member Functions

 GridSearch (std::vector< TupleTypes >... gridValues)
 
template<typename Functor >
std::result_of< Functor(TupleTypes...)>::type evaluate (Functor evaluator, typename std::result_of< Functor(TupleTypes...)>::type startValue, std::array< size_t, std::tuple_size< std::tuple< std::vector< TupleTypes >... >>::value > &resultIndices)
 
template<typename EvalResult >
EvalResult evaluate (EvalResult evaluator(TupleTypes...), EvalResult startValue, std::array< size_t, std::tuple_size< std::tuple< std::vector< TupleTypes >... >>::value > &resultIndices)
 
unsigned int getNrCombos ()
 

Private Member Functions

template<std::size_t I = 0>
std::enable_if< I==sizeof...(TupleTypes), unsigned int >::type nrCombos ()
 

Private Attributes

std::tuple< std::vector< TupleTypes >... > grid_
 
unsigned int combos_ = 1
 
bool combos_ready_ = false
 

Constructor & Destructor Documentation

◆ GridSearch()

GridSearch ( std::vector< TupleTypes >...  gridValues)
inlineexplicit

Member Function Documentation

◆ evaluate() [1/2]

EvalResult evaluate ( EvalResult   evaluatorTupleTypes...,
EvalResult  startValue,
std::array< size_t, std::tuple_size< std::tuple< std::vector< TupleTypes >... >>::value > &  resultIndices 
)
inline

◆ evaluate() [2/2]

std::result_of<Functor(TupleTypes...)>::type evaluate ( Functor  evaluator,
typename std::result_of< Functor(TupleTypes...)>::type  startValue,
std::array< size_t, std::tuple_size< std::tuple< std::vector< TupleTypes >... >>::value > &  resultIndices 
)
inline

◆ getNrCombos()

◆ nrCombos()

std::enable_if<I == sizeof...(TupleTypes), unsigned int>::type nrCombos ( )
inlineprivate

Member Data Documentation

◆ combos_

unsigned int combos_ = 1
private

◆ combos_ready_

bool combos_ready_ = false
private

◆ grid_

std::tuple<std::vector<TupleTypes>...> grid_
private