pub struct SimulatedAnnealing<F> { /* private fields */ }
Expand description
Implementations§
Source§impl<F> SimulatedAnnealing<F>where
F: ArgminFloat,
impl<F> SimulatedAnnealing<F>where
F: ArgminFloat,
Sourcepub fn new(init_temp: F) -> Result<Self, Error>
pub fn new(init_temp: F) -> Result<Self, Error>
Constructor
Parameter:
init_temp
: initial temperature
Sourcepub fn temp_func(self, temperature_func: SATempFunc<F>) -> Self
pub fn temp_func(self, temperature_func: SATempFunc<F>) -> Self
Set temperature function to one of the options in SATempFunc
.
Sourcepub fn stall_accepted(self, iter: u64) -> Self
pub fn stall_accepted(self, iter: u64) -> Self
The optimization stops after there has been no accepted solution after iter
iterations
Sourcepub fn stall_best(self, iter: u64) -> Self
pub fn stall_best(self, iter: u64) -> Self
The optimization stops after there has been no new best solution after iter
iterations
Sourcepub fn reannealing_fixed(self, iter: u64) -> Self
pub fn reannealing_fixed(self, iter: u64) -> Self
Start reannealing after iter
iterations
Sourcepub fn reannealing_accepted(self, iter: u64) -> Self
pub fn reannealing_accepted(self, iter: u64) -> Self
Start reannealing after no accepted solution has been found for iter
iterations
Sourcepub fn reannealing_best(self, iter: u64) -> Self
pub fn reannealing_best(self, iter: u64) -> Self
Start reannealing after no new best solution has been found for iter
iterations
Trait Implementations§
Source§impl<F: Clone> Clone for SimulatedAnnealing<F>
impl<F: Clone> Clone for SimulatedAnnealing<F>
Source§fn clone(&self) -> SimulatedAnnealing<F>
fn clone(&self) -> SimulatedAnnealing<F>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de, F> Deserialize<'de> for SimulatedAnnealing<F>where
F: Deserialize<'de>,
impl<'de, F> Deserialize<'de> for SimulatedAnnealing<F>where
F: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<F> Serialize for SimulatedAnnealing<F>where
F: Serialize,
impl<F> Serialize for SimulatedAnnealing<F>where
F: Serialize,
Source§impl<O, F> Solver<O> for SimulatedAnnealing<F>where
O: ArgminOp<Output = F, Float = F>,
F: ArgminFloat,
impl<O, F> Solver<O> for SimulatedAnnealing<F>where
O: ArgminOp<Output = F, Float = F>,
F: ArgminFloat,
Source§fn next_iter(
&mut self,
op: &mut OpWrapper<O>,
state: &IterState<O>,
) -> Result<ArgminIterData<O>, Error>
fn next_iter( &mut self, op: &mut OpWrapper<O>, state: &IterState<O>, ) -> Result<ArgminIterData<O>, Error>
Perform one iteration of SA algorithm
Source§fn init(
&mut self,
_op: &mut OpWrapper<O>,
_state: &IterState<O>,
) -> Result<Option<ArgminIterData<O>>, Error>
fn init( &mut self, _op: &mut OpWrapper<O>, _state: &IterState<O>, ) -> Result<Option<ArgminIterData<O>>, Error>
Initializes the algorithm Read more
Source§fn terminate(&mut self, _state: &IterState<O>) -> TerminationReason
fn terminate(&mut self, _state: &IterState<O>) -> TerminationReason
Checks whether the algorithm must be terminated
Source§fn terminate_internal(&mut self, state: &IterState<O>) -> TerminationReason
fn terminate_internal(&mut self, state: &IterState<O>) -> TerminationReason
Checks whether basic termination reasons apply. Read more
Auto Trait Implementations§
impl<F> Freeze for SimulatedAnnealing<F>where
F: Freeze,
impl<F> RefUnwindSafe for SimulatedAnnealing<F>where
F: RefUnwindSafe,
impl<F> Send for SimulatedAnnealing<F>where
F: Send,
impl<F> Sync for SimulatedAnnealing<F>where
F: Sync,
impl<F> Unpin for SimulatedAnnealing<F>where
F: Unpin,
impl<F> UnwindSafe for SimulatedAnnealing<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more