nocs

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

View on GitHub

Class secant

Overview

Class secant implements the secant method for a generic lambda function that takes a double as argument.

Example usage

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

std :: cout << secant :: compute(function, -5, 0) << std :: endl; // Prints -2
std :: cout << secant :: compute(function, -0, 5) << std :: endl; // Prints 2

Interface

Static members

Static methods