nocs

NOCS (Not Only Colliding Spheres) exact 2D gas dynamics framework

View on GitHub

Class gss

Overview

Class gss implements a generic Golden Section Search valid for any lambda function that takes a double as argument.

Example usage

auto function = [&](const double & x)
{
  return x * x;
}

std :: cout << gss :: max(function, -1, 2) << std :: endl; // Prints 2
std :: cout << gss :: min(function, -1, 2) << std :: endl; // Prints 0

Interface

Static members

Static methods