pub struct OptimizationResult<O, S, I> {
pub problem: Problem<O>,
pub solver: S,
pub state: I,
}Expand description
Fields§
§problem: Problem<O>Problem
solver: SSolver
state: IIteration state
Implementations§
Source§impl<O, S, I> OptimizationResult<O, S, I>
impl<O, S, I> OptimizationResult<O, S, I>
Sourcepub fn new(problem: Problem<O>, solver: S, state: I) -> Self
pub fn new(problem: Problem<O>, solver: S, state: I) -> Self
Constructs a new instance of OptimizationResult from a problem and a state.
§Example
let rosenbrock = Rosenbrock::new();
let state: IterState<Vec<f64>, (), (), (), (), f64> = IterState::new();
let solver = SomeSolver {};
let result = OptimizationResult::new(Problem::new(rosenbrock), solver, state);Sourcepub fn problem(&self) -> &Problem<O>
pub fn problem(&self) -> &Problem<O>
Returns a reference to the stored problem.
§Example
let problem: &Problem<Rosenbrock> = result.problem();Trait Implementations§
Source§impl<O, S, I> Display for OptimizationResult<O, S, I>
impl<O, S, I> Display for OptimizationResult<O, S, I>
impl<O, S, I: State> Eq for OptimizationResult<O, S, I>
Source§impl<O, S, I: State> Ord for OptimizationResult<O, S, I>
impl<O, S, I: State> Ord for OptimizationResult<O, S, I>
Source§fn cmp(&self, other: &OptimizationResult<O, S, I>) -> Ordering
fn cmp(&self, other: &OptimizationResult<O, S, I>) -> Ordering
Two OptimizationResults are equal if the absolute of the difference between their best
cost values is smaller than epsilon.
Else, an OptimizationResult is better if the best cost function value is strictly better
than the others.
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<O, S, I: State> PartialEq for OptimizationResult<O, S, I>where
I::Float: ArgminFloat,
impl<O, S, I: State> PartialEq for OptimizationResult<O, S, I>where
I::Float: ArgminFloat,
Source§impl<O, S, I: State> PartialOrd for OptimizationResult<O, S, I>
impl<O, S, I: State> PartialOrd for OptimizationResult<O, S, I>
Source§fn partial_cmp(&self, other: &OptimizationResult<O, S, I>) -> Option<Ordering>
fn partial_cmp(&self, other: &OptimizationResult<O, S, I>) -> Option<Ordering>
Two OptimizationResults are equal if the absolute of the difference between their best
cost values is smaller than epsilon.
Else, an OptimizationResult is better if the best cost function value is strictly better
than the others.
Auto Trait Implementations§
impl<O, S, I> Freeze for OptimizationResult<O, S, I>
impl<O, S, I> RefUnwindSafe for OptimizationResult<O, S, I>
impl<O, S, I> Send for OptimizationResult<O, S, I>
impl<O, S, I> Sync for OptimizationResult<O, S, I>
impl<O, S, I> Unpin for OptimizationResult<O, S, I>
impl<O, S, I> UnsafeUnpin for OptimizationResult<O, S, I>
impl<O, S, I> UnwindSafe for OptimizationResult<O, S, I>
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