pub struct MLOptimizationEngine { /* private fields */ }Expand description
ML optimization engine
Implementations§
Source§impl MLOptimizationEngine
impl MLOptimizationEngine
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), MLError>
Sourcepub fn register_algorithm(
&mut self,
name: &str,
algorithm: MLOptimizationAlgorithm,
)
pub fn register_algorithm( &mut self, name: &str, algorithm: MLOptimizationAlgorithm, )
Register an optimization algorithm under the given name.
Sourcepub fn get_algorithm(&self, name: &str) -> Option<&MLOptimizationAlgorithm>
pub fn get_algorithm(&self, name: &str) -> Option<&MLOptimizationAlgorithm>
Get a registered optimization algorithm by name.
Sourcepub fn list_algorithms(&self) -> Vec<String>
pub fn list_algorithms(&self) -> Vec<String>
List the names of all registered optimization algorithms.
Sourcepub fn add_objective(&mut self, objective: OptimizationObjective)
pub fn add_objective(&mut self, objective: OptimizationObjective)
Add an optimization objective to the configured set.
Sourcepub fn objectives(&self) -> &[OptimizationObjective]
pub fn objectives(&self) -> &[OptimizationObjective]
Return a reference to the configured optimization objectives.
Sourcepub fn add_constraint(&mut self, constraint: OptimizationConstraint)
pub fn add_constraint(&mut self, constraint: OptimizationConstraint)
Add an optimization constraint to the configured set.
Sourcepub fn constraints(&self) -> &[OptimizationConstraint]
pub fn constraints(&self) -> &[OptimizationConstraint]
Return a reference to the configured optimization constraints.
pub fn optimize_model( &mut self, model_id: &str, _algorithm: MLOptimizationAlgorithm, ) -> Result<Model, MLError>
Auto Trait Implementations§
impl Freeze for MLOptimizationEngine
impl RefUnwindSafe for MLOptimizationEngine
impl Send for MLOptimizationEngine
impl Sync for MLOptimizationEngine
impl Unpin for MLOptimizationEngine
impl UnsafeUnpin for MLOptimizationEngine
impl UnwindSafe for MLOptimizationEngine
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more