• Jason Rhinelander's avatar
    single_peak_search: return struct · f3ccc293
    Jason Rhinelander authored
    Returning just the argmax is sort of inconvenient when the max is always
    wanted: this returns a struct that has both .max and .arg elements.  It
    should retain backwards compatibility in most cases by making the struct
    implicitly convertible to a double, yielding the `.arg` value, the same
    as before.
algorithms.hpp 15.4 KB