argmin::core

Struct ArgminIterData

Source
pub struct ArgminIterData<O: ArgminOp> { /* private fields */ }
Expand description

The datastructure which is returned by the next_iter method of the Solver trait.

TODO: Rename to IterResult?

Implementations§

Source§

impl<O: ArgminOp> ArgminIterData<O>

Source

pub fn new() -> Self

Constructor

Source

pub fn param(self, param: O::Param) -> Self

Set parameter vector

Source

pub fn cost(self, cost: O::Float) -> Self

Set cost function value

Source

pub fn grad(self, grad: O::Param) -> Self

Set gradient

Source

pub fn hessian(self, hessian: O::Hessian) -> Self

Set Hessian

Source

pub fn jacobian(self, jacobian: O::Jacobian) -> Self

Set Jacobian

Source

pub fn population(self, population: Vec<(O::Param, O::Float)>) -> Self

Set Population

Source

pub fn kv(self, kv: ArgminKV) -> Self

Adds an ArgminKV

Source

pub fn termination_reason(self, reason: TerminationReason) -> Self

Set termination reason

Source

pub fn get_param(&self) -> Option<O::Param>

Get parameter vector

Source

pub fn get_cost(&self) -> Option<O::Float>

Get cost function value

Source

pub fn get_grad(&self) -> Option<O::Param>

Get gradient

Source

pub fn get_hessian(&self) -> Option<O::Hessian>

Get Hessian

Source

pub fn get_jacobian(&self) -> Option<O::Jacobian>

Get Jacobian

Source

pub fn get_population(&self) -> Option<&Vec<(O::Param, O::Float)>>

Get reference to population

Source

pub fn get_termination_reason(&self) -> Option<TerminationReason>

Get termination reason

Source

pub fn get_kv(&self) -> ArgminKV

Return KV

Trait Implementations§

Source§

impl<O: Clone + ArgminOp> Clone for ArgminIterData<O>
where O::Param: Clone, O::Float: Clone, O::Hessian: Clone, O::Jacobian: Clone,

Source§

fn clone(&self) -> ArgminIterData<O>

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<O: Debug + ArgminOp> Debug for ArgminIterData<O>
where O::Param: Debug, O::Float: Debug, O::Hessian: Debug, O::Jacobian: Debug,

Source§

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

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

impl<O: Default + ArgminOp> Default for ArgminIterData<O>

Source§

fn default() -> ArgminIterData<O>

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

Auto Trait Implementations§

§

impl<O> Freeze for ArgminIterData<O>
where <O as ArgminOp>::Param: Freeze, <O as ArgminOp>::Float: Freeze, <O as ArgminOp>::Hessian: Freeze, <O as ArgminOp>::Jacobian: Freeze,

§

impl<O> RefUnwindSafe for ArgminIterData<O>

§

impl<O> Send for ArgminIterData<O>
where <O as ArgminOp>::Param: Send, <O as ArgminOp>::Float: Send, <O as ArgminOp>::Hessian: Send, <O as ArgminOp>::Jacobian: Send,

§

impl<O> Sync for ArgminIterData<O>
where <O as ArgminOp>::Param: Sync, <O as ArgminOp>::Float: Sync, <O as ArgminOp>::Hessian: Sync, <O as ArgminOp>::Jacobian: Sync,

§

impl<O> Unpin for ArgminIterData<O>
where <O as ArgminOp>::Param: Unpin, <O as ArgminOp>::Float: Unpin, <O as ArgminOp>::Hessian: Unpin, <O as ArgminOp>::Jacobian: Unpin,

§

impl<O> UnwindSafe for ArgminIterData<O>

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,