pub struct StudyBuilder { /* private fields */ }Expand description
Fluent builder for a Study, with sensible defaults: a
RandomSampler, a NopPruner, an InMemoryStorage, and
Direction::Minimize. Override any of them before calling
StudyBuilder::build.
Implementations§
Source§impl StudyBuilder
impl StudyBuilder
Sourcepub fn direction(self, direction: Direction) -> Self
pub fn direction(self, direction: Direction) -> Self
Set the optimization direction (default Direction::Minimize).
Sourcepub fn sampler(self, sampler: impl Sampler + 'static) -> Self
pub fn sampler(self, sampler: impl Sampler + 'static) -> Self
Set the search algorithm (default RandomSampler).
Sourcepub fn pruner(self, pruner: impl Pruner + 'static) -> Self
pub fn pruner(self, pruner: impl Pruner + 'static) -> Self
Set the early-stopping policy (default NopPruner).
Sourcepub fn storage(self, storage: impl Storage + 'static) -> Self
pub fn storage(self, storage: impl Storage + 'static) -> Self
Set the storage backend (default InMemoryStorage).
Auto Trait Implementations§
impl !RefUnwindSafe for StudyBuilder
impl !Sync for StudyBuilder
impl !UnwindSafe for StudyBuilder
impl Freeze for StudyBuilder
impl Send for StudyBuilder
impl Unpin for StudyBuilder
impl UnsafeUnpin for StudyBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more