pub struct OptimizationSolver { /* private fields */ }Expand description
Optimization solver
Implementations§
Source§impl OptimizationSolver
impl OptimizationSolver
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), PhysicsError>
Sourcepub fn get_optimizer_type(&self) -> &OptimizerType
pub fn get_optimizer_type(&self) -> &OptimizerType
Get the optimizer type.
Sourcepub fn set_optimizer_type(&mut self, otype: OptimizerType)
pub fn set_optimizer_type(&mut self, otype: OptimizerType)
Set the optimizer type.
Sourcepub fn get_objective_function(&self) -> &ObjectiveFunction
pub fn get_objective_function(&self) -> &ObjectiveFunction
Get a reference to the objective function.
Sourcepub fn get_objective_function_mut(&mut self) -> &mut ObjectiveFunction
pub fn get_objective_function_mut(&mut self) -> &mut ObjectiveFunction
Get a mutable reference to the objective function.
Sourcepub fn add_constraint(&mut self, constraint: Constraint)
pub fn add_constraint(&mut self, constraint: Constraint)
Add a constraint to the optimization problem.
Sourcepub fn list_constraints(&self) -> &[Constraint]
pub fn list_constraints(&self) -> &[Constraint]
List all constraints.
Sourcepub fn remove_constraint(&mut self, index: usize) -> Option<Constraint>
pub fn remove_constraint(&mut self, index: usize) -> Option<Constraint>
Remove a constraint by index.
Sourcepub fn get_solver_parameters(&self) -> &OptimizationSolverParameters
pub fn get_solver_parameters(&self) -> &OptimizationSolverParameters
Get a reference to the solver parameters.
Sourcepub fn get_solver_parameters_mut(&mut self) -> &mut OptimizationSolverParameters
pub fn get_solver_parameters_mut(&mut self) -> &mut OptimizationSolverParameters
Get a mutable reference to the solver parameters.
Auto Trait Implementations§
impl Freeze for OptimizationSolver
impl RefUnwindSafe for OptimizationSolver
impl Send for OptimizationSolver
impl Sync for OptimizationSolver
impl Unpin for OptimizationSolver
impl UnsafeUnpin for OptimizationSolver
impl UnwindSafe for OptimizationSolver
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