14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
-
+
|
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
//! An asynchronous first-order oracle.
pub use crate::data::minorant::SubgradientExtender;
use crate::{DVector, Extendable, Minorant, Real};
use crate::{DVector, Minorant, Real};
use std::sync::Arc;
/// Channel to send evaluation results to.
pub trait ResultSender<P>: Send
where
P: FirstOrderProblem,
{
|
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
-
+
|
/// information (e.g. adding new variables) to the provided channel.
///
/// The updates might be generated asynchronously.
///
/// The default implementation does nothing.
fn update<U, S>(&mut self, _state: U, _tx: S) -> Result<(), Self::Err>
where
U: UpdateState<<Self::Minorant as Extendable>::Primal>,
U: UpdateState<<Self::Minorant as Minorant>::Primal>,
S: UpdateSender<Self> + 'static,
Self: Sized,
{
Ok(())
}
}
|