This commit is contained in:
Ismael 2016-05-25 23:22:53 +02:00
parent 290ac9ee0e
commit 340fe557e2

View File

@ -25,19 +25,19 @@ namespace benchmark {
// Internal function to calculate the different scalability forms // Internal function to calculate the different scalability forms
std::function<double(int)> FittingCurve(BigO complexity) { std::function<double(int)> FittingCurve(BigO complexity) {
switch (complexity) { switch (complexity) {
case oN: case oN:
return [](int n) {return n; }; return [](int n) {return n; };
case oNSquared: case oNSquared:
return [](int n) {return n*n; }; return [](int n) {return n*n; };
case oNCubed: case oNCubed:
return [](int n) {return n*n*n; }; return [](int n) {return n*n*n; };
case oLogN: case oLogN:
return [](int n) {return log2(n); }; return [](int n) {return log2(n); };
case oNLogN: case oNLogN:
return [](int n) {return n * log2(n); }; return [](int n) {return n * log2(n); };
case o1: case o1:
default: default:
return [](int) {return 1; }; return [](int) {return 1; };
} }
} }