42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/// Trait for implementing a first-order problem description.
///
/// All computations made by an implementation are supposed to
/// be asynchronous. Hence, the interface is slightly different
/// compared with [`crate::FirstOrderProblem`].
pub trait FirstOrderProblem {
/// Error raised by this oracle.
type Err;
/// The primal information associated with a minorant.
type Primal: Aggregatable;
/// Return the number of variables.
fn num_variables(&self) -> usize;
/// Return the lower bounds on the variables.
///
/// If no lower bounds a specified, $-\infty$ is assumed.
|
|
|
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/// Trait for implementing a first-order problem description.
///
/// All computations made by an implementation are supposed to
/// be asynchronous. Hence, the interface is slightly different
/// compared with [`crate::FirstOrderProblem`].
pub trait FirstOrderProblem {
/// Error raised by this oracle.
type Err: Send + 'static;
/// The primal information associated with a minorant.
type Primal: Aggregatable + Send + 'static;
/// Return the number of variables.
fn num_variables(&self) -> usize;
/// Return the lower bounds on the variables.
///
/// If no lower bounds a specified, $-\infty$ is assumed.
|