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
source§fn clone(&self) -> TestSolver
fn clone(&self) -> TestSolver
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 Debug for TestSolver
impl Debug for TestSolver
source§impl Default for TestSolver
impl Default for TestSolver
source§fn default() -> TestSolver
fn default() -> TestSolver
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TestSolver
impl<'de> Deserialize<'de> for TestSolver
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 PartialEq for TestSolver
impl PartialEq for TestSolver
source§impl Serialize for TestSolver
impl Serialize 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 Copy for TestSolver
impl Eq for TestSolver
impl 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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.