RsBundle  Diff

Differences From Artifact [a6eb090eb3]:

  • File src/solver.rs — part of check-in [3eeaf28f08] at 2019-07-15 19:44:18 on branch async — Merge trunk (user: fifr size: 36703) [more...]

To Artifact [2b70ef0100]:

  • File src/solver.rs — part of check-in [1e94fdd305] at 2019-07-17 11:23:44 on branch async — Make all errors Send + Sync (user: fifr size: 36719)

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