Expand description
Thin facade for the use-optimization workspace.
The crate reexports the focused optimization crates directly so consumers can opt into one dependency while still using the smaller APIs.
§Examples
use use_optimization::*;
let direction = ObjectiveDirection::Maximize;
let result = grid_search_1d(&[0.0, 1.0, 2.0, 3.0], |x| -(x - 2.0) * (x - 2.0), direction)
.expect("grid search should find a best result");
assert_eq!(result.best_value, 2.0);
assert_eq!(best_value(&[1.0, 3.0, 2.0], direction), Some(3.0));
assert!(Bounds { min: Some(0.0), max: Some(10.0) }.contains(4.0));Re-exports§
pub use use_grid_search;pub use use_local_search;pub use use_loss;pub use use_objective;pub use use_optimization_constraint;pub use use_score;pub use use_search_space;
Structs§
- Bounds
- Grid
Search Result1D - Grid
Search Result2D - Local
Search Config - Local
Search Result - Objective
Value - Range
Space