Struct net_ensembles::sampling::entropic_sampling::EntropicSampling
source · [−]pub struct EntropicSampling<Hist, R, E, S, Res, Energy> { /* private fields */ }
Expand description
Entropic sampling made easy
J. Lee, “New Monte Carlo algorithm: Entropic sampling,” Phys. Rev. Lett. 71, 211–214 (1993), DOI: 10.1103/PhysRevLett.71.211
Implementations
sourceimpl<Hist, R, E, S, Res, T> EntropicSampling<Hist, R, E, S, Res, T>
impl<Hist, R, E, S, Res, T> EntropicSampling<Hist, R, E, S, Res, T>
sourcepub fn energy(&self) -> &T
pub fn energy(&self) -> &T
Energy of ensemble
- assuming
energy_fn
(seeself.entropic_step
etc.) is deterministic and will allways give the same result for the same ensemble, this returns the energy of the current ensemble
sourcepub fn set_step_goal(&mut self, step_goal: usize)
pub fn set_step_goal(&mut self, step_goal: usize)
Number of entropic steps to be performed
- set the number of steps to be performed by entropic sampling
sourcepub fn fraction_accepted_total(&self) -> f64
pub fn fraction_accepted_total(&self) -> f64
Fraction of steps accepted since the creation of self
- total_steps_accepted / total_steps
NaN
if no steps were performed yet
sourcepub fn log_density_estimate(&self) -> &Vec<f64, Global>
pub fn log_density_estimate(&self) -> &Vec<f64, Global>
- returns the (non normalized) log_density estimate log(P(E)), with which the simulation was started
- if you created this from a WangLandau simulation, this is the result of the WangLandau Simulation
sourceimpl<Hist, R, E, S, Res, T> EntropicSampling<Hist, R, E, S, Res, T>where
Hist: Histogram,
R: Rng,
impl<Hist, R, E, S, Res, T> EntropicSampling<Hist, R, E, S, Res, T>where
Hist: Histogram,
R: Rng,
sourcepub fn from_wl(
wl: WangLandau1T<Hist, R, E, S, Res, T>
) -> Result<EntropicSampling<Hist, R, E, S, Res, T>, EntropicErrors>
pub fn from_wl(
wl: WangLandau1T<Hist, R, E, S, Res, T>
) -> Result<EntropicSampling<Hist, R, E, S, Res, T>, EntropicErrors>
Creates Entropic from a WangLandauAdaptive
state
WangLandauAdaptive
state needs to be valid, i.e., you must have called one of theinit*
methods
- this ensures, that the members
old_energy
andold_bin
are notNone
sourcepub fn from_wl_adaptive(
wl: WangLandauAdaptive<Hist, R, E, S, Res, T>
) -> Result<EntropicSampling<Hist, R, E, S, Res, T>, EntropicErrors>
pub fn from_wl_adaptive(
wl: WangLandauAdaptive<Hist, R, E, S, Res, T>
) -> Result<EntropicSampling<Hist, R, E, S, Res, T>, EntropicErrors>
Creates Entropic from a WangLandauAdaptive
state
WangLandauAdaptive
state needs to be valid, i.e., you must have called one of theinit*
methods
- this ensures, that the members
old_energy
andold_bin
are notNone
sourcepub fn log_density_refined(&self) -> Vec<f64, Global>
pub fn log_density_refined(&self) -> Vec<f64, Global>
calculates the (non normalized) log_density estimate log(P(E)) according to the paper
sourcepub fn refine_estimate(&mut self) -> Vec<f64, Global>
pub fn refine_estimate(&mut self) -> Vec<f64, Global>
Calculates self.log_density_refined
and uses that as estimate for a the entropic sampling simulation
- returns old estimate
prepares self
for a new entropic simulation
- sets new estimate for log(P(E))
- resets statistic gathering
- resets step_count
sourceimpl<Hist, R, E, S, Res, T> EntropicSampling<Hist, R, E, S, Res, T>where
Hist: Histogram + HistogramVal<T>,
R: Rng,
E: MarkovChain<S, Res>,
T: Clone,
impl<Hist, R, E, S, Res, T> EntropicSampling<Hist, R, E, S, Res, T>where
Hist: Histogram + HistogramVal<T>,
R: Rng,
E: MarkovChain<S, Res>,
T: Clone,
sourcepub fn entropic_sampling_while<F, G, W>(
&mut self,
energy_fn: F,
print_fn: G,
condition: W
)where
F: FnMut(&E) -> Option<T>,
G: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>),
W: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>) -> bool,
pub fn entropic_sampling_while<F, G, W>(
&mut self,
energy_fn: F,
print_fn: G,
condition: W
)where
F: FnMut(&E) -> Option<T>,
G: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>),
W: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>) -> bool,
Entropic sampling
- performs
self.entropic_step(energy_fn)
untilcondition
is false - Note: you have access to the current step_count (
self.step_count()
)
Parameter
energy_fn
function calculatingSome(energy)
of the system or rather the Parameter of which you wish to obtain the probability distribution. If there are any states, for which the calculation is invalid,None
should be returned- steps resulting in ensembles for which
energy_fn(&mut ensemble)
isNone
will always be rejected - Important
energy_fn
: should be the same as used for Wang Landau, otherwise the results will be wrong! print_fn
: see below
Correlations
- if you want to measure correlations between “energy” and other measurable quantities,
use
print_fn
, which will be called after each step - use this function to write to a file or whatever you desire - Note: You do not have to recalculate the energy, if you need it in
print_fn
: just callself.energy()
- you have access to your ensemble with
self.ensemble()
- if you do not need it, you can use
|_|{}
asprint_fn
sourcepub fn entropic_sampling_while_acc<F, G, W>(
&mut self,
energy_fn: F,
print_fn: G,
condition: W
)where
F: FnMut(&E, &S, &mut T),
G: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>),
W: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>) -> bool,
pub fn entropic_sampling_while_acc<F, G, W>(
&mut self,
energy_fn: F,
print_fn: G,
condition: W
)where
F: FnMut(&E, &S, &mut T),
G: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>),
W: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>) -> bool,
Entropic sampling using an accumulating markov step
- performs
self.entropic_step_acc(&mut energy_fn)
untilcondition(self) == false
Parameter
energy_fn
function calculating the energyE
of the system (or rather the Parameter of which you wish to obtain the probability distribution) during the markov steps, which can be more efficient.- Important
energy_fn
: should be the same as used for Wang Landau, otherwise the results will be wrong! print_fn
: see below
Correlations
- if you want to measure correlations between “energy” and other measurable quantities,
use
print_fn
, which will be called after each step - use this function to write to a file or whatever you desire - Note: You do not have to recalculate the energy, if you need it in
print_fn
: just callself.energy()
- you have access to your ensemble with
self.ensemble()
- if you do not need it, you can use
|_|{}
asprint_fn
sourcepub unsafe fn entropic_sampling_while_unsafe<F, G, W>(
&mut self,
energy_fn: F,
print_fn: G,
condition: W
)where
F: FnMut(&mut E) -> Option<T>,
G: FnMut(&mut EntropicSampling<Hist, R, E, S, Res, T>),
W: FnMut(&mut EntropicSampling<Hist, R, E, S, Res, T>) -> bool,
pub unsafe fn entropic_sampling_while_unsafe<F, G, W>(
&mut self,
energy_fn: F,
print_fn: G,
condition: W
)where
F: FnMut(&mut E) -> Option<T>,
G: FnMut(&mut EntropicSampling<Hist, R, E, S, Res, T>),
W: FnMut(&mut EntropicSampling<Hist, R, E, S, Res, T>) -> bool,
Entropic sampling
- if possible, use
entropic_sampling_while
instead, as it is safer
Safety
- use this if you need mutable access to your ensemble while printing or calculating the condition. Note, that whatever you do there, should not change the energy of the current state. Otherwise this can lead to undefined behavior and the results of the entropic sampling cannot be trusted anymore!
- performs
self.entropic_step(energy_fn)
untilcondition
is false - Note: you have access to the current step_count (
self.step_count()
)
Parameter
energy_fn
function calculatingSome(energy)
of the system or rather the Parameter of which you wish to obtain the probability distribution. If there are any states, for which the calculation is invalid,None
should be returned- steps resulting in ensembles for which
energy_fn(&mut ensemble)
isNone
will always be rejected - Important
energy_fn
: should be the same as used for Wang Landau, otherwise the results will be wrong! print_fn
: see below
Correlations
- if you want to measure correlations between “energy” and other measurable quantities,
use
print_fn
, which will be called after each step - use this function to write to a file or whatever you desire - Note: You do not have to recalculate the energy, if you need it in
print_fn
: just callself.energy()
- you have mutable access to your ensemble with
self.ensemble_mut()
- if you do not need it, you can use
|_|{}
asprint_fn
sourcepub fn entropic_sampling<F, G>(&mut self, energy_fn: F, print_fn: G)where
F: FnMut(&E) -> Option<T>,
G: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>),
pub fn entropic_sampling<F, G>(&mut self, energy_fn: F, print_fn: G)where
F: FnMut(&E) -> Option<T>,
G: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>),
Entropic sampling
- performs
self.entropic_step(energy_fn)
untilself.step_count == self.step_goal
Parameter
energy_fn
function calculatingSome(energy)
of the system or rather the Parameter of which you wish to obtain the probability distribution. If there are any states, for which the calculation is invalid,None
should be returned- steps resulting in ensembles for which
energy_fn(&mut ensemble)
isNone
will always be rejected - Important
energy_fn
: should be the same as used for Wang Landau, otherwise the results will be wrong! print_fn
: see below
Correlations
- if you want to measure correlations between “energy” and other measurable quantities,
use
print_fn
, which will be called after each step - use this function to write to a file or whatever you desire - Note: You do not have to recalculate the energy, if you need it in
print_fn
: just callself.energy()
- you have access to your ensemble with
self.ensemble()
- if you do not need it, you can use
|_|{}
asprint_fn
sourcepub fn entropic_sampling_acc<F, G>(&mut self, energy_fn: F, print_fn: G)where
F: FnMut(&E, &S, &mut T),
G: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>),
pub fn entropic_sampling_acc<F, G>(&mut self, energy_fn: F, print_fn: G)where
F: FnMut(&E, &S, &mut T),
G: FnMut(&EntropicSampling<Hist, R, E, S, Res, T>),
Entropic sampling using an accumulating markov step
- performs
self.entropic_step_acc(&mut energy_fn)
untilself.step_count >= self.step_goal
Parameter
energy_fn
function calculating the energyE
of the system (or rather the Parameter of which you wish to obtain the probability distribution) during the markov steps, which can be more efficient.- Important
energy_fn
: should be the same as used for Wang Landau, otherwise the results will be wrong! print_fn
: see below
Correlations
- if you want to measure correlations between “energy” and other measurable quantities,
use
print_fn
, which will be called after each step - use this function to write to a file or whatever you desire - Note: You do not have to recalculate the energy, if you need it in
print_fn
: just callself.energy()
- you have access to your ensemble with
self.ensemble()
- if you do not need it, you can use
|_|{}
asprint_fn
sourcepub unsafe fn entropic_sampling_unsafe<F, G>(&mut self, energy_fn: F, print_fn: G)where
F: FnMut(&mut E) -> Option<T>,
G: FnMut(&mut EntropicSampling<Hist, R, E, S, Res, T>),
pub unsafe fn entropic_sampling_unsafe<F, G>(&mut self, energy_fn: F, print_fn: G)where
F: FnMut(&mut E) -> Option<T>,
G: FnMut(&mut EntropicSampling<Hist, R, E, S, Res, T>),
Entropic sampling
- if possible, use
entropic_sampling
instead, as it is safer
Safety
- NOTE You have mutable access to your ensemble (and to
self
, at least in the printing function). This makes this function unsafe. You should never change your ensemble in a way, that will effect the outcome of the energy function. Otherwise the results will just be wrong. This is intended for usecases, where the energycalculation is more efficient with mutable access, e.g., through using a buffer stored in the ensemble - performs
self.entropic_step(energy_fn)
untilself.step_count == self.step_goal
Parameter
energy_fn
function calculatingSome(energy)
of the system or rather the Parameter of which you wish to obtain the probability distribution. If there are any states, for which the calculation is invalid,None
should be returned- steps resulting in ensembles for which
energy_fn(&mut ensemble)
isNone
will always be rejected - Important
energy_fn
: should be the same as used for Wang Landau, otherwise the results will be wrong! print_fn
: see below
Correlations
- if you want to measure correlations between “energy” and other measurable quantities,
use
print_fn
, which will be called after each step - use this function to write to a file or whatever you desire - Note: You do not have to recalculate the energy, if you need it in
print_fn
: just callself.energy()
- you have access to your ensemble with
self.ensemble()
- if you do not need it, you can use
|_|{}
asprint_fn
sourcepub unsafe fn entropic_step_unsafe<F>(&mut self, energy_fn: F)where
F: FnMut(&mut E) -> Option<T>,
pub unsafe fn entropic_step_unsafe<F>(&mut self, energy_fn: F)where
F: FnMut(&mut E) -> Option<T>,
Entropic step
- if possible, use entropic_step instead
- performs a single step
Parameter
energy_fn
function calculatingSome(energy)
of the system or rather the Parameter of which you wish to obtain the probability distribution. If there are any states, for which the calculation is invalid,None
should be returned- steps resulting in ensembles for which
energy_fn(&mut ensemble)
isNone
will always be rejected
Important
energy_fn
: should be the same as used for Wang Landau, otherwise the results will be wrong!
Safety
- While you do have mutable access to the ensemble, the energy function should not change the ensemble in a way, which affects the next calculation of the energy
- This is intended for usecases, where the energycalculation is more efficient with mutable access, e.g., through using a buffer stored in the ensemble
sourcepub fn entropic_step<F>(&mut self, energy_fn: F)where
F: FnMut(&E) -> Option<T>,
pub fn entropic_step<F>(&mut self, energy_fn: F)where
F: FnMut(&E) -> Option<T>,
Entropic step
- performs a single step
Parameter
energy_fn
function calculatingSome(energy)
of the system or rather the Parameter of which you wish to obtain the probability distribution. If there are any states, for which the calculation is invalid,None
should be returned- steps resulting in ensembles for which
energy_fn(&mut ensemble)
isNone
will always be rejected
Important
energy_fn
: should be the same as used for Wang Landau, otherwise the results will be wrong!
sourcepub fn entropic_step_acc<F>(&mut self, energy_fn: F)where
F: FnMut(&E, &S, &mut T),
pub fn entropic_step_acc<F>(&mut self, energy_fn: F)where
F: FnMut(&E, &S, &mut T),
Entropic sampling using an accumulating markov step
- performs
self.entropic_step_acc(&mut energy_fn)
untilself.step_count == self.step_goal
Parameter
energy_fn
function calculating the energyE
of the system (or rather the Parameter of which you wish to obtain the probability distribution) during the markov steps, which can be more efficient.- Important
energy_fn
: should be the same as used for Wang Landau, otherwise the results will be wrong! print_fn
: see below
Correlations
- if you want to measure correlations between “energy” and other measurable quantities,
use
print_fn
, which will be called after each step - use this function to write to a file or whatever you desire - Note: You do not have to recalculate the energy, if you need it in
print_fn
: just callself.energy()
- you have access to your ensemble with
self.ensemble()
- if you do not need it, you can use
|_|{}
asprint_fn
Trait Implementations
sourceimpl<Hist, R, E, S, Res, Energy> Clone for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Clone,
R: Clone,
E: Clone,
S: Clone,
Res: Clone,
Energy: Clone,
impl<Hist, R, E, S, Res, Energy> Clone for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Clone,
R: Clone,
E: Clone,
S: Clone,
Res: Clone,
Energy: Clone,
sourcefn clone(&self) -> EntropicSampling<Hist, R, E, S, Res, Energy>
fn clone(&self) -> EntropicSampling<Hist, R, E, S, Res, Energy>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<Hist, R, E, S, Res, Energy> Debug for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Debug,
R: Debug,
E: Debug,
S: Debug,
Res: Debug,
Energy: Debug,
impl<Hist, R, E, S, Res, Energy> Debug for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Debug,
R: Debug,
E: Debug,
S: Debug,
Res: Debug,
Energy: Debug,
sourceimpl<'de, Hist, R, E, S, Res, Energy> Deserialize<'de> for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Deserialize<'de>,
R: Deserialize<'de>,
E: Deserialize<'de>,
S: Deserialize<'de>,
Energy: Deserialize<'de>,
impl<'de, Hist, R, E, S, Res, Energy> Deserialize<'de> for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Deserialize<'de>,
R: Deserialize<'de>,
E: Deserialize<'de>,
S: Deserialize<'de>,
Energy: Deserialize<'de>,
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<EntropicSampling<Hist, R, E, S, Res, Energy>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<EntropicSampling<Hist, R, E, S, Res, Energy>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<Hist, R, E, S, Res, T> Entropic for EntropicSampling<Hist, R, E, S, Res, T>where
Hist: Histogram,
R: Rng,
impl<Hist, R, E, S, Res, T> Entropic for EntropicSampling<Hist, R, E, S, Res, T>where
Hist: Histogram,
R: Rng,
sourcefn step_counter(&self) -> usize
fn step_counter(&self) -> usize
Number of entropic steps done until now
- will be reset by
self.refine_estimate
sourcefn step_goal(&self) -> usize
fn step_goal(&self) -> usize
Number of entropic steps to be performed
- if
self
was created fromWangLandauAdaptive
,step_goal
will be equal to the number of WangLandau steps, that were performed
sourcefn log_density(&self) -> Vec<f64, Global>
fn log_density(&self) -> Vec<f64, Global>
Current (non normalized) estimate of ln(P(E)) Read more
sourcefn write_log<W>(&self, w: W) -> Result<(), Error>where
W: Write,
fn write_log<W>(&self, w: W) -> Result<(), Error>where
W: Write,
Writes Information about the simulation to a file.
E.g. How many steps were performed. Read more
sourcefn total_steps_accepted(&self) -> usize
fn total_steps_accepted(&self) -> usize
How many steps were accepted until now? Read more
sourcefn total_steps_rejected(&self) -> usize
fn total_steps_rejected(&self) -> usize
How many steps were rejected until now? Read more
sourcefn steps_total(&self) -> usize
fn steps_total(&self) -> usize
Counter Read more
sourcefn fraction_accepted_total(&self) -> f64
fn fraction_accepted_total(&self) -> f64
Calculate, which fraction of steps were accepted Read more
sourcefn fraction_rejected_total(&self) -> f64
fn fraction_rejected_total(&self) -> f64
Calculate, which fraction of steps were rejected Read more
sourcefn is_finished(&self) -> bool
fn is_finished(&self) -> bool
Checks wang landau threshold Read more
sourceimpl<Hist, R, E, S, Res, Energy> EntropicEnergy<Energy> for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Histogram,
R: Rng,
impl<Hist, R, E, S, Res, Energy> EntropicEnergy<Energy> for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Histogram,
R: Rng,
sourcefn energy(&self) -> &Energy
fn energy(&self) -> &Energy
Energy of ensemble
- assuming
energy_fn
(seeself.entropic_step
etc.) is deterministic and will allways give the same result for the same ensemble, this returns the energy of the current ensemble
sourceimpl<Hist, R, E, S, Res, Energy> EntropicEnsemble<E> for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Histogram,
R: Rng,
impl<Hist, R, E, S, Res, Energy> EntropicEnsemble<E> for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Histogram,
R: Rng,
sourceimpl<Hist, R, E, S, Res, Energy> EntropicHist<Hist> for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Histogram,
R: Rng,
impl<Hist, R, E, S, Res, Energy> EntropicHist<Hist> for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Histogram,
R: Rng,
sourceimpl<Hist, R, E, S, Res, Energy> HasRng<R> for EntropicSampling<Hist, R, E, S, Res, Energy>where
R: Rng,
impl<Hist, R, E, S, Res, Energy> HasRng<R> for EntropicSampling<Hist, R, E, S, Res, Energy>where
R: Rng,
sourceimpl<Hist, R, E, S, Res, Energy> Serialize for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Serialize,
R: Serialize,
E: Serialize,
S: Serialize,
Energy: Serialize,
impl<Hist, R, E, S, Res, Energy> Serialize for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Serialize,
R: Serialize,
E: Serialize,
S: Serialize,
Energy: Serialize,
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl<Hist, R, E, S, Res, Energy> TryFrom<WangLandau1T<Hist, R, E, S, Res, Energy>> for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Histogram,
R: Rng,
impl<Hist, R, E, S, Res, Energy> TryFrom<WangLandau1T<Hist, R, E, S, Res, Energy>> for EntropicSampling<Hist, R, E, S, Res, Energy>where
Hist: Histogram,
R: Rng,
type Error = EntropicErrors
type Error = EntropicErrors
The type returned in the event of a conversion error.
sourcefn try_from(
wl: WangLandau1T<Hist, R, E, S, Res, Energy>
) -> Result<EntropicSampling<Hist, R, E, S, Res, Energy>, <EntropicSampling<Hist, R, E, S, Res, Energy> as TryFrom<WangLandau1T<Hist, R, E, S, Res, Energy>>>::Error>
fn try_from(
wl: WangLandau1T<Hist, R, E, S, Res, Energy>
) -> Result<EntropicSampling<Hist, R, E, S, Res, Energy>, <EntropicSampling<Hist, R, E, S, Res, Energy> as TryFrom<WangLandau1T<Hist, R, E, S, Res, Energy>>>::Error>
Performs the conversion.
sourceimpl<Hist, R, E, S, Res, T> TryFrom<WangLandauAdaptive<Hist, R, E, S, Res, T>> for EntropicSampling<Hist, R, E, S, Res, T>where
Hist: Histogram,
R: Rng,
impl<Hist, R, E, S, Res, T> TryFrom<WangLandauAdaptive<Hist, R, E, S, Res, T>> for EntropicSampling<Hist, R, E, S, Res, T>where
Hist: Histogram,
R: Rng,
sourcefn try_from(
wl: WangLandauAdaptive<Hist, R, E, S, Res, T>
) -> Result<EntropicSampling<Hist, R, E, S, Res, T>, <EntropicSampling<Hist, R, E, S, Res, T> as TryFrom<WangLandauAdaptive<Hist, R, E, S, Res, T>>>::Error>
fn try_from(
wl: WangLandauAdaptive<Hist, R, E, S, Res, T>
) -> Result<EntropicSampling<Hist, R, E, S, Res, T>, <EntropicSampling<Hist, R, E, S, Res, T> as TryFrom<WangLandauAdaptive<Hist, R, E, S, Res, T>>>::Error>
Uses as stepsize: first entry of bestof. If bestof is empty, it uses
wl.min_step_size() + (wl.max_step_size() - wl.max_step_size()) / 2
type Error = EntropicErrors
type Error = EntropicErrors
The type returned in the event of a conversion error.
Auto Trait Implementations
impl<Hist, R, E, S, Res, Energy> RefUnwindSafe for EntropicSampling<Hist, R, E, S, Res, Energy>where
E: RefUnwindSafe,
Energy: RefUnwindSafe,
Hist: RefUnwindSafe,
R: RefUnwindSafe,
Res: RefUnwindSafe,
S: RefUnwindSafe,
impl<Hist, R, E, S, Res, Energy> Send for EntropicSampling<Hist, R, E, S, Res, Energy>where
E: Send,
Energy: Send,
Hist: Send,
R: Send,
Res: Send,
S: Send,
impl<Hist, R, E, S, Res, Energy> Sync for EntropicSampling<Hist, R, E, S, Res, Energy>where
E: Sync,
Energy: Sync,
Hist: Sync,
R: Sync,
Res: Sync,
S: Sync,
impl<Hist, R, E, S, Res, Energy> Unpin for EntropicSampling<Hist, R, E, S, Res, Energy>where
E: Unpin,
Energy: Unpin,
Hist: Unpin,
R: Unpin,
Res: Unpin,
S: Unpin,
impl<Hist, R, E, S, Res, Energy> UnwindSafe for EntropicSampling<Hist, R, E, S, Res, Energy>where
E: UnwindSafe,
Energy: UnwindSafe,
Hist: UnwindSafe,
R: UnwindSafe,
Res: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
fn try_cast_trunc(self) -> Result<T, Error>
fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
fn try_cast_nearest(self) -> Result<T, Error>
fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
fn try_cast_floor(self) -> Result<T, Error>
fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
fn try_cast_ceil(self) -> Result<T, Error>
fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more