pub struct SimulatedAnnealing {
pub initial_temp: f64,
pub final_temp: f64,
pub cooling_rate: f64,
pub step_scale: f64,
/* private fields */
}Expand description
Simulated Annealing optimizer.
Fields§
§initial_temp: f64Initial temperature (default: 100.0)
final_temp: f64Final temperature (default: 1e-8)
cooling_rate: f64Cooling rate α (default: 0.95)
step_scale: f64Perturbation scale (fraction of range, default: 0.1)
Implementations§
Source§impl SimulatedAnnealing
impl SimulatedAnnealing
Sourcepub fn with_initial_temp(self, t: f64) -> Self
pub fn with_initial_temp(self, t: f64) -> Self
Set initial temperature.
Sourcepub fn with_cooling_rate(self, alpha: f64) -> Self
pub fn with_cooling_rate(self, alpha: f64) -> Self
Set cooling rate.
Trait Implementations§
Source§impl Clone for SimulatedAnnealing
impl Clone for SimulatedAnnealing
Source§fn clone(&self) -> SimulatedAnnealing
fn clone(&self) -> SimulatedAnnealing
Returns a duplicate 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 Debug for SimulatedAnnealing
impl Debug for SimulatedAnnealing
Source§impl Default for SimulatedAnnealing
impl Default for SimulatedAnnealing
Source§impl<'de> Deserialize<'de> for SimulatedAnnealing
impl<'de> Deserialize<'de> for SimulatedAnnealing
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 PerturbativeMetaheuristic for SimulatedAnnealing
impl PerturbativeMetaheuristic for SimulatedAnnealing
Source§fn optimize<F>(
&mut self,
objective: &F,
space: &SearchSpace,
budget: Budget,
) -> OptimizationResult<Self::Solution>
fn optimize<F>( &mut self, objective: &F, space: &SearchSpace, budget: Budget, ) -> OptimizationResult<Self::Solution>
Run optimization. Read more
Auto Trait Implementations§
impl Freeze for SimulatedAnnealing
impl RefUnwindSafe for SimulatedAnnealing
impl Send for SimulatedAnnealing
impl Sync for SimulatedAnnealing
impl Unpin for SimulatedAnnealing
impl UnwindSafe for SimulatedAnnealing
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more