| OpenMS 2.5.0

Public Member Functions | Private Member Functions | Private Attributes | List of all members
GridSearch< TupleTypes > Class Template Reference

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

## 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 | ) |

inline explicit

## Member Function Documentation

## ◆ evaluate() [1/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

References GridSearch< TupleTypes >::grid_.

## ◆ evaluate() [2/2]

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

inline

References GridSearch< TupleTypes >::grid_.

## ◆ getNrCombos()

unsigned int getNrCombos | ( |  | ) |

inline

References GridSearch< TupleTypes >::combos_, GridSearch< TupleTypes >::combos_ready_, and GridSearch< TupleTypes >::nrCombos().

## ◆ nrCombos()

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

inline private

References GridSearch< TupleTypes >::combos_, and GridSearch< TupleTypes >::combos_ready_.

Referenced by GridSearch< TupleTypes >::getNrCombos().

## Member Data Documentation

## ◆ combos_

unsigned int combos_ = 1

private

Referenced by GridSearch< TupleTypes >::getNrCombos(), and GridSearch< TupleTypes >::nrCombos().

## ◆ combos_ready_

bool combos_ready_ = false

private

Referenced by GridSearch< TupleTypes >::getNrCombos(), and GridSearch< TupleTypes >::nrCombos().

## ◆ grid_

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

private

Referenced by GridSearch< TupleTypes >::evaluate().