[][src]Trait qmc::sse::qmc_traits::qmc_stepper::QMCStepper

pub trait QMCStepper {
    fn timestep(&mut self, beta: f64) -> &[bool];
fn get_n(&self) -> usize;
fn get_energy_for_average_n(&self, average_n: f64, beta: f64) -> f64;
fn state_ref(&self) -> &[bool]; fn timesteps(&mut self, t: usize, beta: f64) -> f64 { ... }
fn timesteps_sample(
        &mut self,
        t: usize,
        beta: f64,
        sampling_freq: Option<usize>
    ) -> (Vec<Vec<bool>>, f64) { ... }
fn timesteps_sample_iter<F>(
        &mut self,
        t: usize,
        beta: f64,
        sampling_freq: Option<usize>,
        iter_fn: F
    ) -> f64
    where
        F: Fn(&[bool])
, { ... }
fn timesteps_sample_iter_zip<F, I, T>(
        &mut self,
        t: usize,
        beta: f64,
        sampling_freq: Option<usize>,
        zip_with: I,
        iter_fn: F
    ) -> f64
    where
        F: Fn(T, &[bool]),
        I: Iterator<Item = T>
, { ... }
fn timesteps_measure<F, T>(
        &mut self,
        timesteps: usize,
        beta: f64,
        init_t: T,
        state_fold: F,
        sampling_freq: Option<usize>
    ) -> (T, f64)
    where
        F: Fn(T, &[bool]) -> T
, { ... } }

Provides helpers to structs which take QMC timesteps.

Required methods

fn timestep(&mut self, beta: f64) -> &[bool]

Take a single QMC step and return a reference to the state

fn get_n(&self) -> usize

Get the current number of operators in the graph

fn get_energy_for_average_n(&self, average_n: f64, beta: f64) -> f64

Get the average energy given the average number of ops and beta.

fn state_ref(&self) -> &[bool]

Get a reference to the state.

Loading content...

Provided methods

fn timesteps(&mut self, t: usize, beta: f64) -> f64

Take t qmc timesteps at beta.

fn timesteps_sample(
    &mut self,
    t: usize,
    beta: f64,
    sampling_freq: Option<usize>
) -> (Vec<Vec<bool>>, f64)

Take t qmc timesteps at beta and sample states.

fn timesteps_sample_iter<F>(
    &mut self,
    t: usize,
    beta: f64,
    sampling_freq: Option<usize>,
    iter_fn: F
) -> f64 where
    F: Fn(&[bool]), 

Take t qmc timesteps at beta and sample states, apply f to each.

fn timesteps_sample_iter_zip<F, I, T>(
    &mut self,
    t: usize,
    beta: f64,
    sampling_freq: Option<usize>,
    zip_with: I,
    iter_fn: F
) -> f64 where
    F: Fn(T, &[bool]),
    I: Iterator<Item = T>, 

Take t qmc timesteps at beta and sample states, apply f to each and the zipped iterator.

fn timesteps_measure<F, T>(
    &mut self,
    timesteps: usize,
    beta: f64,
    init_t: T,
    state_fold: F,
    sampling_freq: Option<usize>
) -> (T, f64) where
    F: Fn(T, &[bool]) -> T, 

Take t qmc timesteps at beta and sample states, fold across states and output results.

Loading content...

Implementors

impl<R, M, L> QMCStepper for QMCIsingGraph<R, M, L> where
    R: Rng,
    M: OpContainerConstructor + ClassicalLoopUpdater + Into<L>,
    L: ClusterUpdater + Into<M>, 
[src]

fn timestep(&mut self, beta: f64) -> &[bool][src]

Perform a single step of qmc.

impl<R, M, L> QMCStepper for QMC<R, M, L> where
    R: Rng,
    M: OpContainerConstructor + DiagonalUpdater + Into<L>,
    L: ClusterUpdater + Into<M>, 
[src]

Loading content...