Commit 17158856 by Ismael

fixed typos

parent 340fe557
...@@ -57,7 +57,7 @@ struct LeastSq { ...@@ -57,7 +57,7 @@ struct LeastSq {
benchmark::BigO complexity; benchmark::BigO complexity;
}; };
// Function to to return an string for the calculated complexity // Function to return an string for the calculated complexity
std::string GetBigOString(benchmark::BigO complexity); std::string GetBigOString(benchmark::BigO complexity);
// Find the coefficient for the high-order term in the running time, by // Find the coefficient for the high-order term in the running time, by
......
...@@ -41,7 +41,7 @@ std::function<double(int)> FittingCurve(BigO complexity) { ...@@ -41,7 +41,7 @@ std::function<double(int)> FittingCurve(BigO complexity) {
} }
} }
// Function to to return an string for the calculated complexity // Function to return an string for the calculated complexity
std::string GetBigOString(BigO complexity) { std::string GetBigOString(BigO complexity) {
switch (complexity) { switch (complexity) {
case oN: case oN:
...@@ -61,22 +61,27 @@ std::string GetBigOString(BigO complexity) { ...@@ -61,22 +61,27 @@ std::string GetBigOString(BigO complexity) {
} }
} }
// Find the coefficient for the high-order term in the running time, by minimizing the sum of squares of relative error, for the fitting curve given on the lambda expresion. // Find the coefficient for the high-order term in the running time, by
// minimizing the sum of squares of relative error, for the fitting curve
// given by the lambda expresion.
// - n : Vector containing the size of the benchmark tests. // - n : Vector containing the size of the benchmark tests.
// - time : Vector containing the times for the benchmark tests. // - time : Vector containing the times for the benchmark tests.
// - fitting_curve : lambda expresion (e.g. [](int n) {return n; };). // - fitting_curve : lambda expresion (e.g. [](int n) {return n; };).
// For a deeper explanation on the algorithm logic, look the README file at // For a deeper explanation on the algorithm logic, look the README file at
// http://github.com/ismaelJimenez/Minimal-Cpp-Least-Squared-Fit // http://github.com/ismaelJimenez/Minimal-Cpp-Least-Squared-Fit
// This interface is currently not used from the oustide, but it has been provided // This interface is currently not used from the oustide, but it has been
// for future upgrades. If in the future it is not needed to support Cxx03, then // provided for future upgrades. If in the future it is not needed to support
// all the calculations could be upgraded to use lambdas because they are more // Cxx03, then all the calculations could be upgraded to use lambdas because
// powerful and provide a cleaner inferface than enumerators, but complete // they are more powerful and provide a cleaner inferface than enumerators,
// implementation with lambdas will not work for Cxx03 (e.g. lack of std::function). // but complete implementation with lambdas will not work for Cxx03
// (e.g. lack of std::function).
// In case lambdas are implemented, the interface would be like : // In case lambdas are implemented, the interface would be like :
// -> Complexity([](int n) {return n;};) // -> Complexity([](int n) {return n;};)
// and any arbitrary and valid equation would be allowed, but the option to calculate // and any arbitrary and valid equation would be allowed, but the option to
// the best fit to the most common scalability curves will still be kept. // calculate the best fit to the most common scalability curves will still
// be kept.
LeastSq CalculateLeastSq(const std::vector<int>& n, LeastSq CalculateLeastSq(const std::vector<int>& n,
const std::vector<double>& time, const std::vector<double>& time,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment