Tune

Trait Tune 

Source
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§

Source

fn 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

Tune 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§

Source

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.

Source

fn 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())

Tune the trial move maximum size with default parameters.

The defaults are:

  • target_acceptance: 0.2
  • samples: 8,000
  • steps: 32

Implementors§

Source§

impl<P, B, S, X, C, L, H, MA> Tune<P, B, S, X, C, L, H, MA> for Sweep<L>
where P: Copy, B: Copy + Default + Transform<S> + Position<Position = P>, S: Copy + Default + Position<Position = P>, X: PointUpdate<P, SiteKey>, L: LocalTrial<B> + Adjust + Display, H: DeltaEnergyOne<B, S, X, C>, C: Wrap<B> + Wrap<S> + GenerateGhosts<S>, MA: Temperature,

Source§

impl<P, B, S, X, C, L, H, MA, K> Tune<P, B, S, X, C, L, H, MA> for ParallelSweep<L, K, B, S>
where P: Copy, B: Copy + Default + Transform<S> + Position<Position = P>, S: Copy + Default + Position<Position = P>, X: PointUpdate<P, SiteKey>, L: LocalTrial<B> + Adjust + Display, H: DeltaEnergyOne<B, S, X, C>, C: Wrap<B> + Wrap<S> + GenerateGhosts<S>, MA: Temperature,