pub trait Tune<P, B, S, X, C, L, H, MA> {
// Required method
fn tune(
&mut self,
microstate: &Microstate<B, S, X, C>,
hamiltonian: &H,
macrostate: &MA,
target_acceptance: OpenUnitIntervalNumber,
samples: usize,
steps: usize,
);
// Provided methods
fn tune_with_options(
&mut self,
microstate: &Microstate<B, S, X, C>,
hamiltonian: &H,
macrostate: &MA,
options: &TuneOptions,
) { ... }
fn tune_default(
&mut self,
microstate: &Microstate<B, S, X, C>,
hamiltonian: &H,
macrostate: &MA,
) { ... }
}Expand description
Tune trial move maximum sizes toward a target acceptance ratio.
Trial moves that implement Tune can automatically adjust
their trial move size to achieve a desired acceptance ratio.
The tuning is performed in the context of a given microstate,
Hamiltonian, and macrostate but the microstate is not modified.
Required Methods§
Sourcefn tune(
&mut self,
microstate: &Microstate<B, S, X, C>,
hamiltonian: &H,
macrostate: &MA,
target_acceptance: OpenUnitIntervalNumber,
samples: usize,
steps: usize,
)
👎Deprecated since 1.1.0: use tune_with_options
fn tune( &mut self, microstate: &Microstate<B, S, X, C>, hamiltonian: &H, macrostate: &MA, target_acceptance: OpenUnitIntervalNumber, samples: usize, steps: usize, )
tune_with_optionsTune the trial move maximum size to achieve a given acceptance ratio.
Use tune_with_options and TuneOptions:default() unless you have a
specific need to adjust the tuning parameters.
tune performs samples individual trial moves to measure the
current acceptance ratio. It then adjusts the trial move size
to increase or decrease the acceptance ratio as needed over
steps iterations.
Provided Methods§
Sourcefn tune_with_options(
&mut self,
microstate: &Microstate<B, S, X, C>,
hamiltonian: &H,
macrostate: &MA,
options: &TuneOptions,
)
fn tune_with_options( &mut self, microstate: &Microstate<B, S, X, C>, hamiltonian: &H, macrostate: &MA, options: &TuneOptions, )
Tune the trial move maximum size to achieve a given acceptance ratio.
tune_with_options performs samples individual trial moves to measure the
current acceptance ratio. It then adjusts the trial move size
to increase or decrease the acceptance ratio as needed over
steps iterations.
Sourcefn tune_default(
&mut self,
microstate: &Microstate<B, S, X, C>,
hamiltonian: &H,
macrostate: &MA,
)
👎Deprecated since 1.1.0: use tune_with_options(..., &TuneOptions::default())
fn tune_default( &mut self, microstate: &Microstate<B, S, X, C>, hamiltonian: &H, macrostate: &MA, )
tune_with_options(..., &TuneOptions::default())Tune the trial move maximum size with default parameters.
The defaults are:
target_acceptance: 0.2samples: 8,000steps: 32