pub struct TestSolver {}Expand description
A (non-working) solver useful for testing
Implements the Solver trait.
Implementations§
Source§impl TestSolver
impl TestSolver
Sourcepub fn new() -> TestSolver
pub fn new() -> TestSolver
Create an instance of TestSolver.
§Example
use argmin::core::test_utils::TestSolver;
let solver = TestSolver::new();Trait Implementations§
Source§impl Clone for TestSolver
impl Clone for TestSolver
impl Copy for TestSolver
Source§impl Debug for TestSolver
impl Debug for TestSolver
Source§impl Default for TestSolver
impl Default for TestSolver
impl Eq for TestSolver
Source§impl PartialEq for TestSolver
impl PartialEq for TestSolver
Source§impl<O> Solver<O, IterState<Vec<f64>, (), (), (), (), f64>> for TestSolver
impl<O> Solver<O, IterState<Vec<f64>, (), (), (), (), f64>> for TestSolver
Source§fn next_iter(
&mut self,
_problem: &mut Problem<O>,
state: IterState<Vec<f64>, (), (), (), (), f64>,
) -> Result<(IterState<Vec<f64>, (), (), (), (), f64>, Option<KV>), Error>
fn next_iter( &mut self, _problem: &mut Problem<O>, state: IterState<Vec<f64>, (), (), (), (), f64>, ) -> Result<(IterState<Vec<f64>, (), (), (), (), f64>, Option<KV>), Error>
Computes a single iteration of the algorithm and has access to the optimization problem
definition and the internal state of the solver.
Returns an updated
state and optionally a KV which holds key-value pairs used in
Observers.Source§fn init(
&mut self,
_problem: &mut Problem<O>,
state: I,
) -> Result<(I, Option<KV>), Error>
fn init( &mut self, _problem: &mut Problem<O>, state: I, ) -> Result<(I, Option<KV>), Error>
Initializes the algorithm. Read more
Source§fn terminate_internal(&mut self, state: &I) -> TerminationStatus
fn terminate_internal(&mut self, state: &I) -> TerminationStatus
Checks whether basic termination reasons apply. Read more
Source§fn terminate(&mut self, _state: &I) -> TerminationStatus
fn terminate(&mut self, _state: &I) -> TerminationStatus
Used to implement stopping criteria, in particular criteria which are not covered by
(
terminate_internal. Read moreimpl StructuralPartialEq for TestSolver
Auto Trait Implementations§
impl Freeze for TestSolver
impl RefUnwindSafe for TestSolver
impl Send for TestSolver
impl Sync for TestSolver
impl Unpin for TestSolver
impl UnsafeUnpin for TestSolver
impl UnwindSafe for TestSolver
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