Skip to main content

CobyqaOptions

Struct CobyqaOptions 

Source
#[non_exhaustive]
pub struct CobyqaOptions { pub rhobeg: f64, pub rhoend: f64, pub max_evaluations: Option<usize>, pub max_iterations: Option<usize>, pub npt: Option<usize>, pub feasibility_tol: f64, pub target: f64, pub scale: bool, pub filter_size: Option<usize>, pub store_history: bool, pub history_size: Option<usize>, pub constants: CobyqaConstants, }
Expand description

Options for cobyqa, with SciPy’s defaults.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§rhobeg: f64

The initial trust-region radius.

§rhoend: f64

The final radius (the accuracy wanted).

§max_evaluations: Option<usize>

The largest number of evaluations of the problem (default 500 n).

§max_iterations: Option<usize>

The largest number of iterations (default 1000 n).

§npt: Option<usize>

The number of interpolation points, from n + 1 to (n + 1)(n + 2)/2 (default 2 n + 1).

§feasibility_tol: f64

The constraint violation accepted for a point to count as feasible (default √ε).

§target: f64

The run stops successfully at a feasible point with an objective at most this (default −∞).

§scale: bool

Map the variables to the unit box [−1, 1]ⁿ first (SciPy’s scale); needs finite bounds on every variable and is ignored otherwise.

§filter_size: Option<usize>

The most non-dominated points kept in the filter that the result is chosen from (default: all).

§store_history: bool

Keep the objective and violation at every evaluation (the last history_size of them) in the result.

§history_size: Option<usize>§constants: CobyqaConstants

The constants of the method (SciPy’s keyword arguments); the defaults are SciPy’s.

Implementations§

Source§

impl CobyqaOptions

Source

pub fn with_radii(rhobeg: f64, rhoend: f64) -> Self

The defaults with the given initial and final radii.

Source

pub fn with_limits(self, max_evaluations: usize, max_iterations: usize) -> Self

Limits on the evaluations and iterations.

Source

pub fn with_npt(self, npt: usize) -> Self

The number of interpolation points.

Source

pub fn with_target(self, target: f64) -> Self

Stop at a feasible point with an objective at most target.

Source

pub fn with_scale(self, scale: bool) -> Self

Scale the variables to the unit box (needs finite bounds).

Source

pub fn with_filter_size(self, size: usize) -> Self

Limit the filter that the result is chosen from.

Source

pub fn with_history(self, size: usize) -> Self

Keep the objective and violation of the last size evaluations in the result.

Source

pub fn with_constants(self, constants: CobyqaConstants) -> Self

The constants of the method.

Trait Implementations§

Source§

impl Clone for CobyqaOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for CobyqaOptions

Source§

impl Debug for CobyqaOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CobyqaOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSerialize for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.