Struct net_ensembles::sampling::wang_landau::WangLandau1T
source · [−]pub struct WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy> { /* private fields */ }
Expand description
The 1/t Wang Landau approach comes from this paper
R. E. Belardinelli and V. D. Pereyra, “Fast algorithm to calculate density of states,” Phys. Rev. E 75: 046701 (2007), DOI 10.1103/PhysRevE.75.046701
- The original Wang Landau algorithim comes from this paper
F. Wang and D. P. Landau, “Efficient, multiple-range random walk algorithm to calculate the density of states,” Phys. Rev. Lett. 86, 2050–2053 (2001), DOI 10.1103/PhysRevLett.86.2050
Implementations
sourceimpl<Hist, Rng, Ensemble, S, Res, Energy> WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>
impl<Hist, Rng, Ensemble, S, Res, Energy> WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>
sourcepub fn into_inner(self) -> (Ensemble, Hist, Rng)
pub fn into_inner(self) -> (Ensemble, Hist, Rng)
Returns internal ensemble, histogram and Rng
sourceimpl<Hist, R, E, S, Res, Energy> WangLandau1T<Hist, R, E, S, Res, Energy>where
Hist: Histogram + HistogramVal<Energy>,
impl<Hist, R, E, S, Res, Energy> WangLandau1T<Hist, R, E, S, Res, Energy>where
Hist: Histogram + HistogramVal<Energy>,
sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Check if self
is initialized
- if this returns true, you can begin the WangLandau simulation
- otherwise call one of the
self.init*
methods
sourceimpl<Hist, R, E, S, Res, Energy> WangLandau1T<Hist, R, E, S, Res, Energy>
impl<Hist, R, E, S, Res, Energy> WangLandau1T<Hist, R, E, S, Res, Energy>
sourcepub fn set_initial_probability_guess(
self,
new_guess: Vec<f64, Global>,
new_log_f: f64
) -> Result<WangLandau1T<Hist, R, E, S, Res, Energy>, SetInitialError>where
Hist: Histogram,
pub fn set_initial_probability_guess(
self,
new_guess: Vec<f64, Global>,
new_log_f: f64
) -> Result<WangLandau1T<Hist, R, E, S, Res, Energy>, SetInitialError>where
Hist: Histogram,
Set the initial guess for the non-normalized probability estimate
new_guess
your new guess for the probability estimate. Its length has to equal the number of bins of the internal histogram which is the same as the length of the old estimate which you can get by calling log_density. All contained values have to be finitenew_log_f
: Which log_f to start at? 0.0 < log_f <= 10.0 has to be true. If you don’t know what’s best I recommand starting with log_f=1.0, the better your probability estimate is, the smaller this value can be
Note
This will reset the calculation. Meaning you will have to call one of the initializing functions like init_greedy_heuristic
again
and all internal counters are reset to 0
sourceimpl<Hist, R, E, S, Res, Energy> WangLandau1T<Hist, R, E, S, Res, Energy>where
R: Rng,
E: MarkovChain<S, Res>,
Energy: Clone,
Hist: Histogram + HistogramVal<Energy>,
impl<Hist, R, E, S, Res, Energy> WangLandau1T<Hist, R, E, S, Res, Energy>where
R: Rng,
E: MarkovChain<S, Res>,
Energy: Clone,
Hist: Histogram + HistogramVal<Energy>,
sourcepub fn new(
log_f_threshold: f64,
ensemble: E,
rng: R,
step_size: usize,
histogram: Hist,
check_refine_every: usize
) -> Result<WangLandau1T<Hist, R, E, S, Res, Energy>, WangLandauErrors>
pub fn new(
log_f_threshold: f64,
ensemble: E,
rng: R,
step_size: usize,
histogram: Hist,
check_refine_every: usize
) -> Result<WangLandau1T<Hist, R, E, S, Res, Energy>, WangLandauErrors>
Create a new WangLandau simulation
IMPORTANT You have to call one of the init*
functions,
to create a valid state, before you can start the simulation
Parameter
log_f_threshold
: how small should the ln(f) (see paper) become until the simulation is finished?ensemble
: The ensemble to explore. Current state of ensemble will be used as inital condition for theinit*
functionsstep_size
: The markov steps will be performed with this step size, e.g.,ensemble.m_steps(step_size)
histogram
: Provides the binning. You can either use one of the already implemented histograms, likeHistU32Fast
,HistU32
,HistF64
etc. or implement your own by implementing the traitsHistogram + HistogramVal<Energy>
yourselfcheck_refine_every
: how often to check, if every bin in the histogram was hit. Needs to be at least 1. Good values depend on the problem at hand, but if you are unsure, you can start with a value like 1000
sourcepub fn init_greedy_heuristic<F>(
&mut self,
energy_fn: F,
step_limit: Option<u64>
) -> Result<(), WangLandauErrors>where
F: Fn(&mut E) -> Option<Energy>,
pub fn init_greedy_heuristic<F>(
&mut self,
energy_fn: F,
step_limit: Option<u64>
) -> Result<(), WangLandauErrors>where
F: Fn(&mut E) -> Option<Energy>,
Find a valid starting Point
- if the ensemble is already at a valid starting point, the ensemble is left unchanged (as long as your energy calculation does not change the ensemble)
- Uses a greedy heuristik. Performs markov steps. If that brought us closer to the target interval, the step is accepted. Otherwise it is rejected
Parameter
step_limit
: Some(val) -> val is max number of steps tried, if no valid state is found, it will return an Error. None -> will loop until either a valid state is found or foreverenergy_fn
function calculatingSome(energy)
of the system or rather the Parameter of which you wish to obtain the probability distribution. Has to be the same function as used for the wang landau simulation later. 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
sourcepub fn init_interval_heuristik<F>(
&mut self,
overlap: NonZeroUsize,
energy_fn: F,
step_limit: Option<u64>
) -> Result<(), WangLandauErrors>where
F: Fn(&mut E) -> Option<Energy>,
Hist: HistogramIntervalDistance<Energy>,
pub fn init_interval_heuristik<F>(
&mut self,
overlap: NonZeroUsize,
energy_fn: F,
step_limit: Option<u64>
) -> Result<(), WangLandauErrors>where
F: Fn(&mut E) -> Option<Energy>,
Hist: HistogramIntervalDistance<Energy>,
Find a valid starting Point
- if the ensemble is already at a valid starting point, the ensemble is left unchanged (as long as your energy calculation does not change the ensemble)
- Uses overlapping intervals. Accepts a step, if the resulting ensemble is in the same interval as before, or it is in an interval closer to the target interval
- Take a look at the
HistogramIntervalDistance
trait
Parameter
step_limit
: Some(val) -> val is max number of steps tried, if no valid state is found, it will return an Error. None -> will loop until either a valid state is found or foreverenergy_fn
function calculatingSome(energy)
of the system or rather the Parameter of which you wish to obtain the probability distribution. Has to be the same function as used for the wang landau simulation later. 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
sourcepub fn init_mixed_heuristik<F, U>(
&mut self,
overlap: NonZeroUsize,
mid: U,
energy_fn: F,
step_limit: Option<u64>
) -> Result<(), WangLandauErrors>where
F: Fn(&mut E) -> Option<Energy>,
Hist: HistogramIntervalDistance<Energy>,
U: One + Bounded + WrappingAdd + Eq + PartialOrd<U>,
pub fn init_mixed_heuristik<F, U>(
&mut self,
overlap: NonZeroUsize,
mid: U,
energy_fn: F,
step_limit: Option<u64>
) -> Result<(), WangLandauErrors>where
F: Fn(&mut E) -> Option<Energy>,
Hist: HistogramIntervalDistance<Energy>,
U: One + Bounded + WrappingAdd + Eq + PartialOrd<U>,
Find a valid starting Point
- if the ensemble is already at a valid starting point, the ensemble is left unchanged (as long as your energy calculation does not change the ensemble)
overlap
- seeHistogramIntervalDistance
trait Should be greater than 0 and smaller than the number of bins in your histogram. E.g.overlap = 3
if you have 200 binsmid
- should be something like128u8
,0i8
or0i16
. It is very unlikely that using a type with more than 16 bit makes sense for midstep_limit
: Some(val) -> val is max number of steps tried, if no valid state is found, it will return an Error. None -> will loop until either a valid state is found or forever- alternates between greedy and interval heuristik everytime a wrapping counter passes
mid
orU::min_value()
- I recommend using this heuristik, if you do not know which one to use
Parameter
energy_fn
function calculatingSome(energy)
of the system or rather the Parameter of which you wish to obtain the probability distribution. Has to be the same function as used for the wang landau simulation later. 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
sourcepub fn wang_landau_step<F>(&mut self, energy_fn: F)where
F: Fn(&E) -> Option<Energy>,
pub fn wang_landau_step<F>(&mut self, energy_fn: F)where
F: Fn(&E) -> Option<Energy>,
Wang Landau Step
- performs a single Wang Landau 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
- You have to call one of the
self.init*
functions before calling this one - will panic otherwise
sourcepub unsafe fn wang_landau_step_unsafe<F>(&mut self, energy_fn: F)where
F: FnMut(&mut E) -> Option<Energy>,
pub unsafe fn wang_landau_step_unsafe<F>(&mut self, energy_fn: F)where
F: FnMut(&mut E) -> Option<Energy>,
Wang Landau Step
- if possible, use
self.wang_landau_step()
instead - it is safer - unsafe, because you have to make sure, that the
energy_fn
function does not change the state of the ensemble in such a way, that the result ofenergy_fn
changes when called again. Maybe do cleanup at the beginning of the energy function? - performs a single Wang Landau 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
- You have to call one of the
self.init*
functions before calling this one - will panic otherwise
sourcepub fn wang_landau_step_acc<F>(&mut self, energy_fn: F)where
F: FnMut(&E, &S, &mut Energy),
pub fn wang_landau_step_acc<F>(&mut self, energy_fn: F)where
F: FnMut(&E, &S, &mut Energy),
Wang Landau Step
- performs a single Wang Landau step
Parameter
energy_fn
function calculating the energy of the system on the fly- steps resulting in invalid ensembles are not allowed!
Important
- You have to call one of the
self.init*
functions before calling this one - will panic otherwise
sourcepub fn wang_landau_convergence<F>(&mut self, energy_fn: F)where
F: Fn(&E) -> Option<Energy>,
pub fn wang_landau_convergence<F>(&mut self, energy_fn: F)where
F: Fn(&E) -> Option<Energy>,
Wang Landau
- perform Wang Landau simulation
- calls
self.wang_landau_step(energy_fn, valid_ensemble)
untilself.is_finished()
sourcepub fn wang_landau_convergence_acc<F>(&mut self, energy_fn: F)where
F: FnMut(&E, &S, &mut Energy),
pub fn wang_landau_convergence_acc<F>(&mut self, energy_fn: F)where
F: FnMut(&E, &S, &mut Energy),
Wang Landau - efficient energy calculation
- perform Wang Landau simulation
- calls
self.wang_landau_step_acc(energy_fn, valid_ensemble)
untilself.is_finished()
sourcepub unsafe fn wang_landau_convergence_unsafe<F>(&mut self, energy_fn: F)where
F: FnMut(&mut E) -> Option<Energy>,
pub unsafe fn wang_landau_convergence_unsafe<F>(&mut self, energy_fn: F)where
F: FnMut(&mut E) -> Option<Energy>,
Wang Landau
- if possible, use
self.wang_landau_convergence()
instead - it is safer - You have mutable access to your ensemble, which is why this function is unsafe. If you do anything, which changes the future outcome of the energy function, the results will be wrong!
- perform Wang Landau simulation
- calls
self.wang_landau_step_unsafe(energy_fn, valid_ensemble)
untilself.is_finished()
sourcepub fn wang_landau_while<F, W>(&mut self, energy_fn: F, condition: W)where
F: Fn(&E) -> Option<Energy>,
W: FnMut(&WangLandau1T<Hist, R, E, S, Res, Energy>) -> bool,
pub fn wang_landau_while<F, W>(&mut self, energy_fn: F, condition: W)where
F: Fn(&E) -> Option<Energy>,
W: FnMut(&WangLandau1T<Hist, R, E, S, Res, Energy>) -> bool,
Wang Landau
- perform Wang Landau simulation
- calls
self.wang_landau_step(energy_fn)
untilself.is_finished()
orcondition(&self)
is false
sourcepub fn wang_landau_while_acc<F, W>(&mut self, energy_fn: F, condition: W)where
F: FnMut(&E, &S, &mut Energy),
W: FnMut(&WangLandau1T<Hist, R, E, S, Res, Energy>) -> bool,
pub fn wang_landau_while_acc<F, W>(&mut self, energy_fn: F, condition: W)where
F: FnMut(&E, &S, &mut Energy),
W: FnMut(&WangLandau1T<Hist, R, E, S, Res, Energy>) -> bool,
Wang Landau
- perform Wang Landau simulation
- calls
self.wang_landau_step(energy_fn)
untilself.is_finished()
orcondition(&self)
is false
sourcepub unsafe fn wang_landau_while_unsafe<F, W>(
&mut self,
energy_fn: F,
condition: W
)where
F: FnMut(&mut E) -> Option<Energy>,
W: FnMut(&WangLandau1T<Hist, R, E, S, Res, Energy>) -> bool,
pub unsafe fn wang_landau_while_unsafe<F, W>(
&mut self,
energy_fn: F,
condition: W
)where
F: FnMut(&mut E) -> Option<Energy>,
W: FnMut(&WangLandau1T<Hist, R, E, S, Res, Energy>) -> bool,
Wang Landau
- if possible, use
self.wang_landau_while()
instead - it is safer - You have mutable access to your ensemble, which is why this function is unsafe. If you do anything, which changes the future outcome of the energy function, the results will be wrong!
- perform Wang Landau simulation
- calls
self.wang_landau_step(energy_fn)
untilself.is_finished()
orcondition(&self)
is false
Trait Implementations
sourceimpl<Hist, Rng, Ensemble, S, Res, Energy> Clone for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Hist: Clone,
Rng: Clone,
Ensemble: Clone,
S: Clone,
Res: Clone,
Energy: Clone,
impl<Hist, Rng, Ensemble, S, Res, Energy> Clone for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Hist: Clone,
Rng: Clone,
Ensemble: Clone,
S: Clone,
Res: Clone,
Energy: Clone,
sourcefn clone(&self) -> WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>
fn clone(&self) -> WangLandau1T<Hist, Rng, Ensemble, 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, Rng, Ensemble, S, Res, Energy> Debug for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Hist: Debug,
Rng: Debug,
Ensemble: Debug,
S: Debug,
Res: Debug,
Energy: Debug,
impl<Hist, Rng, Ensemble, S, Res, Energy> Debug for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Hist: Debug,
Rng: Debug,
Ensemble: Debug,
S: Debug,
Res: Debug,
Energy: Debug,
sourceimpl<'de, Hist, Rng, Ensemble, S, Res, Energy> Deserialize<'de> for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Hist: Deserialize<'de>,
Rng: Deserialize<'de>,
Ensemble: Deserialize<'de>,
S: Deserialize<'de>,
Energy: Deserialize<'de>,
impl<'de, Hist, Rng, Ensemble, S, Res, Energy> Deserialize<'de> for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Hist: Deserialize<'de>,
Rng: Deserialize<'de>,
Ensemble: Deserialize<'de>,
S: Deserialize<'de>,
Energy: Deserialize<'de>,
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<Hist, Rng, Ensemble, S, Res, Energy> Serialize for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Hist: Serialize,
Rng: Serialize,
Ensemble: Serialize,
S: Serialize,
Energy: Serialize,
impl<Hist, Rng, Ensemble, S, Res, Energy> Serialize for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Hist: Serialize,
Rng: Serialize,
Ensemble: 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, Energy> WangLandau for WangLandau1T<Hist, R, E, S, Res, Energy>
impl<Hist, R, E, S, Res, Energy> WangLandau for WangLandau1T<Hist, R, E, S, Res, Energy>
sourcefn log_f_threshold(&self) -> f64
fn log_f_threshold(&self) -> f64
returns currently set threshold for log_f
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. Read more
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, 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. Read more
sourcefn mode(&self) -> WangLandauMode
fn mode(&self) -> WangLandauMode
Returns current wang landau mode Read more
sourcefn step_counter(&self) -> usize
fn step_counter(&self) -> usize
Counter Read more
sourcefn total_steps_rejected(&self) -> usize
fn total_steps_rejected(&self) -> usize
How many steps were rejected until now? Read more
sourcefn total_steps_accepted(&self) -> usize
fn total_steps_accepted(&self) -> usize
How many steps were accepted until now? Read more
sourcefn is_finished(&self) -> bool
fn is_finished(&self) -> bool
Checks wang landau threshold Read more
sourcefn log_density_base10(&self) -> Vec<f64, Global>
fn log_density_base10(&self) -> Vec<f64, Global>
Current (non normalized) estimate of log10(P(E)) Read more
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)) 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
sourceimpl<Hist, R, E, S, Res, Energy> WangLandauEnergy<Energy> for WangLandau1T<Hist, R, E, S, Res, Energy>
impl<Hist, R, E, S, Res, Energy> WangLandauEnergy<Energy> for WangLandau1T<Hist, R, E, S, Res, Energy>
sourceimpl<Hist, R, E, S, Res, Energy> WangLandauEnsemble<E> for WangLandau1T<Hist, R, E, S, Res, Energy>
impl<Hist, R, E, S, Res, Energy> WangLandauEnsemble<E> for WangLandau1T<Hist, R, E, S, Res, Energy>
sourceimpl<Hist, R, E, S, Res, Energy> WangLandauHist<Hist> for WangLandau1T<Hist, R, E, S, Res, Energy>
impl<Hist, R, E, S, Res, Energy> WangLandauHist<Hist> for WangLandau1T<Hist, R, E, S, Res, Energy>
Auto Trait Implementations
impl<Hist, Rng, Ensemble, S, Res, Energy> RefUnwindSafe for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Energy: RefUnwindSafe,
Ensemble: RefUnwindSafe,
Hist: RefUnwindSafe,
Res: RefUnwindSafe,
Rng: RefUnwindSafe,
S: RefUnwindSafe,
impl<Hist, Rng, Ensemble, S, Res, Energy> Send for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Energy: Send,
Ensemble: Send,
Hist: Send,
Res: Send,
Rng: Send,
S: Send,
impl<Hist, Rng, Ensemble, S, Res, Energy> Sync for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Energy: Sync,
Ensemble: Sync,
Hist: Sync,
Res: Sync,
Rng: Sync,
S: Sync,
impl<Hist, Rng, Ensemble, S, Res, Energy> Unpin for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Energy: Unpin,
Ensemble: Unpin,
Hist: Unpin,
Res: Unpin,
Rng: Unpin,
S: Unpin,
impl<Hist, Rng, Ensemble, S, Res, Energy> UnwindSafe for WangLandau1T<Hist, Rng, Ensemble, S, Res, Energy>where
Energy: UnwindSafe,
Ensemble: UnwindSafe,
Hist: UnwindSafe,
Res: UnwindSafe,
Rng: 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