Trait net_ensembles::sampling::WangLandau
source · [−]pub trait WangLandau {
Show 15 methods
fn log_f(&self) -> f64;
fn log_f_threshold(&self) -> f64;
fn set_log_f_threshold(
&mut self,
log_f_threshold: f64
) -> Result<f64, WangLandauErrors>;
fn log_density(&self) -> &Vec<f64, Global>;
fn write_log<W>(&self, writer: W) -> Result<(), Error>
where
W: Write;
fn mode(&self) -> WangLandauMode;
fn step_counter(&self) -> usize;
fn total_steps_accepted(&self) -> usize;
fn total_steps_rejected(&self) -> usize;
fn is_finished(&self) -> bool { ... }
fn log_density_base10(&self) -> Vec<f64, Global> { ... }
fn log_density_base(&self, base: f64) -> Vec<f64, Global> { ... }
fn steps_total(&self) -> usize { ... }
fn fraction_accepted_total(&self) -> f64 { ... }
fn fraction_rejected_total(&self) -> f64 { ... }
}Expand description
Traits for quantities that all Wang Landau simulations have
- see also:
WangLandauHist - this trait is for convinience, so that you do not have
to write all the trait bounds of, e.g.,
WangLandauHist, if you are not using functuinality, that requires it
Required Methods
sourcefn set_log_f_threshold(
&mut self,
log_f_threshold: f64
) -> Result<f64, WangLandauErrors>
fn set_log_f_threshold(
&mut self,
log_f_threshold: f64
) -> Result<f64, WangLandauErrors>
Try to set the threshold.
log_f_threshold > 0.0has to be truelog_f_thresholdhas to be finite
sourcefn log_density(&self) -> &Vec<f64, Global>
fn log_density(&self) -> &Vec<f64, Global>
Current (non normalized) estimate of ln(P(E))
- i.e., of the natural logarithm of the probability density function for the requested interval
- this is what we are doing the simulations for
sourcefn write_log<W>(&self, writer: W) -> Result<(), Error>where
W: Write,
fn write_log<W>(&self, writer: W) -> Result<(), Error>where
W: Write,
Writes Information about the simulation to a file. E.g. How many steps were performed.
sourcefn mode(&self) -> WangLandauMode
fn mode(&self) -> WangLandauMode
Returns current wang landau mode
- see
WangLandauModefor an explaination
sourcefn step_counter(&self) -> usize
fn step_counter(&self) -> usize
Counter
- how many wang Landau steps were performed until now?
- this does not include steps, that were perfored to find a inital valid ensemble
sourcefn total_steps_accepted(&self) -> usize
fn total_steps_accepted(&self) -> usize
How many steps were accepted until now?
- this includes steps, that were perfored to find a inital valid ensemble
sourcefn total_steps_rejected(&self) -> usize
fn total_steps_rejected(&self) -> usize
How many steps were rejected until now?
- this includes steps, that were perfored to find a inital valid ensemble
Provided Methods
sourcefn is_finished(&self) -> bool
fn is_finished(&self) -> bool
Checks wang landau threshold
log_f <= log_f_threshold
sourcefn log_density_base10(&self) -> Vec<f64, Global>
fn log_density_base10(&self) -> Vec<f64, Global>
Current (non normalized) estimate of log10(P(E))
- i.e., of logarithm with base 10 of the probability density function for the requested interval
- this is what we are doing the simulations for
sourcefn log_density_base(&self, base: f64) -> Vec<f64, Global>
fn log_density_base(&self, base: f64) -> Vec<f64, Global>
Current (non normalized) estimate of log_base(P(E))
- i.e., of logarithm with arbitrary base of the probability density function for the requested interval
- this is what we are doing the simulations for
sourcefn steps_total(&self) -> usize
fn steps_total(&self) -> usize
Counter
- how many wang Landau steps were performed until now?
- this includes steps, that were perfored to find a inital valid ensemble
sourcefn fraction_accepted_total(&self) -> f64
fn fraction_accepted_total(&self) -> f64
Calculate, which fraction of steps were accepted
- this includes steps, that were perfored to find a inital valid ensemble
- if no steps were performed, it returns
f64::NAN
sourcefn fraction_rejected_total(&self) -> f64
fn fraction_rejected_total(&self) -> f64
Calculate, which fraction of steps were rejected
- this includes steps, that were perfored to find a inital valid ensemble
- if no steps were performed, it returns
f64::NAN