pub fn grid_search_1d<F>( values: &[f64], objective: F, direction: ObjectiveDirection, ) -> Option<GridSearchResult1D>where F: Fn(f64) -> f64,