• Jason Rhinelander's avatar
    single_peak_search - better argument type handling · 779a7ae2
    Jason Rhinelander authored
    The previous change to single_peak_search which deduced the domain type
    from the arguments was pretty undesirable: if you specified both left
    and right as integers, you'd get a search over the integer domain.
    This removes the type deduction, instead using an optional template
    parameter which defaults to double and isn't deduced, thus allowing
    custom types to be used, but falling back to double if not specified.
    This also fixes the test code to remove the tests that specified both
    relative and absolute tolerances (the latter was removed).
algorithms.hpp 22.7 KB