Theoretica
A C++ numerical and automatic mathematical library
generator.h
Go to the documentation of this file.
1 
5 
6 #ifndef CHEYBYSHEV_GENERATOR_H
7 #define CHEYBYSHEV_GENERATOR_H
8 
9 #include <functional>
10 #include "../core/common.h"
11 #include "../core/random.h"
12 
13 
14 namespace chebyshev {
15 namespace benchmark {
16 
18  namespace generator {
19 
21  inline auto uniform1D(long double a, long double b) {
22 
23  return [=](unsigned int i) {
24  return random::uniform(a, b);
25  };
26  }
27 
28  }
29 
30 }}
31 
32 #endif
auto uniform1D(long double a, long double b)
Uniform generator over a domain.
Definition: generator.h:21
void benchmark(const std::string &name, Function func, const std::vector< InputType > &input, unsigned int runs=settings.defaultRuns, bool quiet=false)
Run a benchmark on a generic function, with the given input vector.
Definition: benchmark.h:187
long double uniform(long double a, long double b)
Generate a uniformly distributed random number.
Definition: random.h:54
General namespace of the framework.
Definition: benchmark_structures.h:16