feat: v0.5.0 — comprehensive documentation release
Theme: documentation and project polish. No public-API changes; this is the v0.5 release that elevates heuropt's docs/onboarding/governance to bar-setting status. Adds: - mdbook user guide at docs/book/ with intro, getting-started, defining-problems, choosing-an-algorithm, cookbook (7 recipes), comparison vs other libraries, stability/SemVer, migration guides. Deploys to https://swaits.github.io/heuropt/ via .github/workflows/ docs.yml. - Runnable rustdoc examples on every algorithm (35 of them), all exercised by cargo test --doc. - Three real-world examples: portfolio.rs (multi-obj with budget constraint), hyperparam_tuning.rs (BO + TPE), scheduling.rs (permutation via SA + SwapMutation against Smith's-rule oracle). - Governance: CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md (adopting builderscode.org's Builder's Code of Conduct), GitHub issue templates, PR template. Polishes: - README hero with badges + user-guide link. - lib.rs crate-level docs. - CHANGELOG entry for 0.5.0. Bumps Cargo.toml to 0.5.0.
This commit is contained in:
@@ -48,6 +48,41 @@ impl Default for HypeConfig {
|
||||
|
||||
/// Hypervolume Estimation Algorithm: many-objective MOEA that selects via
|
||||
/// Monte Carlo–estimated hypervolume contributions.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use heuropt::prelude::*;
|
||||
///
|
||||
/// struct Schaffer;
|
||||
/// impl Problem for Schaffer {
|
||||
/// type Decision = Vec<f64>;
|
||||
/// fn objectives(&self) -> ObjectiveSpace {
|
||||
/// ObjectiveSpace::new(vec![Objective::minimize("f1"), Objective::minimize("f2")])
|
||||
/// }
|
||||
/// fn evaluate(&self, x: &Vec<f64>) -> Evaluation {
|
||||
/// Evaluation::new(vec![x[0] * x[0], (x[0] - 2.0).powi(2)])
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// let bounds = vec![(-5.0_f64, 5.0_f64)];
|
||||
/// let mut opt = Hype::new(
|
||||
/// HypeConfig {
|
||||
/// population_size: 20,
|
||||
/// generations: 20,
|
||||
/// reference_point: vec![30.0, 30.0],
|
||||
/// mc_samples: 100,
|
||||
/// seed: 42,
|
||||
/// },
|
||||
/// RealBounds::new(bounds.clone()),
|
||||
/// CompositeVariation {
|
||||
/// crossover: SimulatedBinaryCrossover::new(bounds.clone(), 15.0, 0.5),
|
||||
/// mutation: PolynomialMutation::new(bounds, 20.0, 1.0),
|
||||
/// },
|
||||
/// );
|
||||
/// let r = opt.run(&Schaffer);
|
||||
/// assert!(!r.pareto_front.is_empty());
|
||||
/// ```
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Hype<I, V> {
|
||||
/// Algorithm configuration.
|
||||
|
||||
Reference in New Issue
Block a user