pub struct TreeSA {
pub betas: Vec<f64>,
pub ntrials: usize,
pub niters: usize,
pub initializer: Initializer,
pub score: ScoreFunction,
pub decomposition_type: DecompositionType,
}Expand description
Configuration for the TreeSA optimizer.
Fields§
§betas: Vec<f64>Inverse temperature schedule (β values)
ntrials: usizeNumber of independent trials to run
niters: usizeIterations per temperature level
initializer: InitializerInitialization method
score: ScoreFunctionScoring function for evaluating solutions
decomposition_type: DecompositionTypeDecomposition type (Tree or Path)
Implementations§
Source§impl TreeSA
impl TreeSA
Sourcepub fn new(
betas: Vec<f64>,
ntrials: usize,
niters: usize,
initializer: Initializer,
score: ScoreFunction,
) -> Self
pub fn new( betas: Vec<f64>, ntrials: usize, niters: usize, initializer: Initializer, score: ScoreFunction, ) -> Self
Create a new TreeSA with custom parameters.
Sourcepub fn with_sc_target(self, sc_target: f64) -> Self
pub fn with_sc_target(self, sc_target: f64) -> Self
Set the space complexity target.
Sourcepub fn with_ntrials(self, ntrials: usize) -> Self
pub fn with_ntrials(self, ntrials: usize) -> Self
Set the number of trials.
Sourcepub fn with_niters(self, niters: usize) -> Self
pub fn with_niters(self, niters: usize) -> Self
Set the number of iterations per temperature level.
Sourcepub fn with_betas(self, betas: Vec<f64>) -> Self
pub fn with_betas(self, betas: Vec<f64>) -> Self
Set the inverse temperature schedule.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TreeSA
impl RefUnwindSafe for TreeSA
impl Send for TreeSA
impl Sync for TreeSA
impl Unpin for TreeSA
impl UnwindSafe for TreeSA
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more