30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
use std::mem::swap;
use std::result::Result;
use std::time::Instant;
/// A solver error.
#[derive(Debug)]
pub enum SolverError<E> {
/// An error occured during oracle evaluation.
Evaluation(E),
/// An error occured during oracle update.
Update(E),
/// An error has been raised by the master problem.
Master(MasterProblemError),
/// The oracle did not return a minorant.
NoMinorant,
/// The dimension of some data is wrong.
Dimension,
|
|
|
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
use std::mem::swap;
use std::result::Result;
use std::time::Instant;
/// A solver error.
#[derive(Debug)]
pub enum SolverError<E> {
/// An error occurred during oracle evaluation.
Evaluation(E),
/// An error occurred during oracle update.
Update(E),
/// An error has been raised by the master problem.
Master(MasterProblemError),
/// The oracle did not return a minorant.
NoMinorant,
/// The dimension of some data is wrong.
Dimension,
|
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
|
/// Accumulated information about the last iteration.
iterinfos: Vec<IterationInfo>,
}
impl<P: FirstOrderProblem> Solver<P>
where
P::Err: Into<Box<dyn Error>>,
{
/**
* Create a new solver for the given problem.
*
* Note that the solver owns the problem, so you cannot use the
* same problem description elsewhere as long as it is assigned to
* the solver. However, it is possible to get a reference to the
|
|
|
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
|
/// Accumulated information about the last iteration.
iterinfos: Vec<IterationInfo>,
}
impl<P: FirstOrderProblem> Solver<P>
where
P::Err: Into<Box<dyn Error + Send + Sync>>,
{
/**
* Create a new solver for the given problem.
*
* Note that the solver owns the problem, so you cannot use the
* same problem description elsewhere as long as it is assigned to
* the solver. However, it is possible to get a reference to the
|