refactor(sampler): extract shared utilities to reduce duplication

- Add sampler/common.rs with distribution helpers (internal_bounds,
  from_internal, to_internal, sample_random) used by 8 samplers
- Add sampler/tpe/common.rs with TPE sampling functions
  (sample_tpe_float, sample_tpe_int, sample_tpe_categorical)
  shared by TpeSampler, MultivariateTpeSampler, and MotpeSampler
- Remove ~940 lines of near-identical code across sampler modules
This commit is contained in:
Manuel Raimann
2026-02-12 15:25:27 +01:00
parent 4781107ede
commit d80d2bb1fb
12 changed files with 385 additions and 945 deletions
+1
View File
@@ -3,6 +3,7 @@
pub mod bohb;
#[cfg(feature = "cma-es")]
pub mod cma_es;
pub(crate) mod common;
pub mod de;
pub(crate) mod genetic;
#[cfg(feature = "gp")]