[−][src]Struct argmin::prelude::IterState
Fields
param: <O as ArgminOp>::Param
Current parameter vector
prev_param: <O as ArgminOp>::Param
Previous parameter vector
best_param: <O as ArgminOp>::Param
Current best parameter vector
prev_best_param: <O as ArgminOp>::Param
Previous best parameter vector
cost: f64
Current cost function value
prev_cost: f64
Previous cost function value
best_cost: f64
Current best cost function value
prev_best_cost: f64
Previous best cost function value
target_cost: f64
Target cost function value
grad: Option<<O as ArgminOp>::Param>
Current gradient
prev_grad: Option<<O as ArgminOp>::Param>
Previous gradient
hessian: Option<<O as ArgminOp>::Hessian>
Current Hessian
prev_hessian: Option<<O as ArgminOp>::Hessian>
Previous Hessian
jacobian: Option<<O as ArgminOp>::Jacobian>
Current Jacobian
prev_jacobian: Option<<O as ArgminOp>::Jacobian>
Previous Jacobian
iter: u64
Current iteration
last_best_iter: u64
Iteration number of last best cost
max_iters: u64
Maximum number of iterations
cost_func_count: u64
Number of cost function evaluations so far
grad_func_count: u64
Number of gradient evaluations so far
hessian_func_count: u64
Number of Hessian evaluations so far
jacobian_func_count: u64
Number of Jacobian evaluations so far
modify_func_count: u64
Number of modify evaluations so far
time: Duration
Time required so far
termination_reason: TerminationReason
Reason of termination
Methods
impl<O> IterState<O> where
O: ArgminOp,
[src]
O: ArgminOp,
pub fn new(param: <O as ArgminOp>::Param) -> IterState<O>
[src]
Create new IterState from param
pub fn param(&mut self, param: <O as ArgminOp>::Param) -> &mut IterState<O>
[src]
Set parameter vector. This shifts the stored parameter vector to the previous parameter vector.
pub fn best_param(&mut self, param: <O as ArgminOp>::Param) -> &mut IterState<O>
[src]
Set best paramater vector. This shifts the stored best parameter vector to the previous best parameter vector.
pub fn cost(&mut self, cost: f64) -> &mut IterState<O>
[src]
Set the current cost function value. This shifts the stored cost function value to the previous cost function value.
pub fn best_cost(&mut self, cost: f64) -> &mut IterState<O>
[src]
Set the current best cost function value. This shifts the stored best cost function value to the previous cost function value.
pub fn grad(&mut self, grad: <O as ArgminOp>::Param) -> &mut IterState<O>
[src]
Set gradient. This shifts the stored gradient to the previous gradient.
pub fn hessian(
&mut self,
hessian: <O as ArgminOp>::Hessian
) -> &mut IterState<O>
[src]
&mut self,
hessian: <O as ArgminOp>::Hessian
) -> &mut IterState<O>
Set Hessian. This shifts the stored Hessian to the previous Hessian.
pub fn jacobian(
&mut self,
jacobian: <O as ArgminOp>::Jacobian
) -> &mut IterState<O>
[src]
&mut self,
jacobian: <O as ArgminOp>::Jacobian
) -> &mut IterState<O>
Set Jacobian. This shifts the stored Jacobian to the previous Jacobian.
pub fn target_cost(&mut self, target_cost: f64) -> &mut IterState<O>
[src]
pub fn max_iters(&mut self, max_iters: u64) -> &mut IterState<O>
[src]
pub fn last_best_iter(&mut self, last_best_iter: u64) -> &mut IterState<O>
[src]
pub fn termination_reason(
&mut self,
termination_reason: TerminationReason
) -> &mut IterState<O>
[src]
&mut self,
termination_reason: TerminationReason
) -> &mut IterState<O>
pub fn time(&mut self, time: Duration) -> &mut IterState<O>
[src]
pub fn get_param(&self) -> <O as ArgminOp>::Param
[src]
pub fn get_prev_param(&self) -> <O as ArgminOp>::Param
[src]
pub fn get_best_param(&self) -> <O as ArgminOp>::Param
[src]
pub fn get_prev_best_param(&self) -> <O as ArgminOp>::Param
[src]
pub fn get_cost(&self) -> f64
[src]
pub fn get_prev_cost(&self) -> f64
[src]
pub fn get_best_cost(&self) -> f64
[src]
pub fn get_prev_best_cost(&self) -> f64
[src]
pub fn get_target_cost(&self) -> f64
[src]
pub fn get_cost_func_count(&self) -> u64
[src]
pub fn get_grad_func_count(&self) -> u64
[src]
pub fn get_hessian_func_count(&self) -> u64
[src]
pub fn get_jacobian_func_count(&self) -> u64
[src]
pub fn get_modify_func_count(&self) -> u64
[src]
pub fn get_last_best_iter(&self) -> u64
[src]
pub fn get_termination_reason(&self) -> TerminationReason
[src]
pub fn get_time(&self) -> Duration
[src]
pub fn get_grad(&self) -> Option<<O as ArgminOp>::Param>
[src]
pub fn get_prev_grad(&self) -> Option<<O as ArgminOp>::Param>
[src]
pub fn get_hessian(&self) -> Option<<O as ArgminOp>::Hessian>
[src]
pub fn get_prev_hessian(&self) -> Option<<O as ArgminOp>::Hessian>
[src]
pub fn get_jacobian(&self) -> Option<<O as ArgminOp>::Jacobian>
[src]
pub fn get_prev_jacobian(&self) -> Option<<O as ArgminOp>::Jacobian>
[src]
pub fn get_iter(&self) -> u64
[src]
pub fn get_max_iters(&self) -> u64
[src]
pub fn increment_iter(&mut self)
[src]
Increment the number of iterations by one
pub fn increment_func_counts(&mut self, op: &OpWrapper<O>)
[src]
Increment all function evaluation counts by the evaluation counts of another operator
wrapped in OpWrapper
.
pub fn set_func_counts(&mut self, op: &OpWrapper<O>)
[src]
Set all function evaluation counts to the evaluation counts of another operator
wrapped in OpWrapper
.
pub fn increment_cost_func_count(&mut self, num: u64)
[src]
Increment cost function evaluation count by num
pub fn increment_grad_func_count(&mut self, num: u64)
[src]
Increment gradient function evaluation count by num
pub fn increment_hessian_func_count(&mut self, num: u64)
[src]
Increment Hessian function evaluation count by num
pub fn increment_jacobian_func_count(&mut self, num: u64)
[src]
Increment Jacobian function evaluation count by num
pub fn increment_modify_func_count(&mut self, num: u64)
[src]
Increment modify function evaluation count by num
pub fn new_best(&mut self)
[src]
Indicate that a new best parameter vector was found
pub fn is_best(&self) -> bool
[src]
Returns whether the current parameter vector is also the best parameter vector found so far.
pub fn terminated(&self) -> bool
[src]
Return whether the algorithm has terminated or not
Trait Implementations
impl<O> Serialize for IterState<O> where
O: ArgminOp,
<O as ArgminOp>::Param: Serialize,
[src]
O: ArgminOp,
<O as ArgminOp>::Param: Serialize,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<O> Default for IterState<O> where
O: ArgminOp,
<O as ArgminOp>::Param: Default,
[src]
O: ArgminOp,
<O as ArgminOp>::Param: Default,
impl<O> KV for IterState<O> where
O: ArgminOp,
[src]
O: ArgminOp,
impl<'de, O> Deserialize<'de> for IterState<O> where
O: ArgminOp,
<O as ArgminOp>::Param: Deserialize<'de>,
[src]
O: ArgminOp,
<O as ArgminOp>::Param: Deserialize<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<IterState<O>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<IterState<O>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<O> Debug for IterState<O> where
O: ArgminOp + Debug,
<O as ArgminOp>::Param: Debug,
<O as ArgminOp>::Hessian: Debug,
<O as ArgminOp>::Jacobian: Debug,
[src]
O: ArgminOp + Debug,
<O as ArgminOp>::Param: Debug,
<O as ArgminOp>::Hessian: Debug,
<O as ArgminOp>::Jacobian: Debug,
impl<O> Clone for IterState<O> where
O: ArgminOp + Clone,
<O as ArgminOp>::Param: Clone,
<O as ArgminOp>::Hessian: Clone,
<O as ArgminOp>::Jacobian: Clone,
[src]
O: ArgminOp + Clone,
<O as ArgminOp>::Param: Clone,
<O as ArgminOp>::Hessian: Clone,
<O as ArgminOp>::Jacobian: Clone,
Auto Trait Implementations
impl<O> Send for IterState<O> where
<O as ArgminOp>::Hessian: Send,
<O as ArgminOp>::Jacobian: Send,
<O as ArgminOp>::Param: Send,
<O as ArgminOp>::Hessian: Send,
<O as ArgminOp>::Jacobian: Send,
<O as ArgminOp>::Param: Send,
impl<O> Sync for IterState<O> where
<O as ArgminOp>::Hessian: Sync,
<O as ArgminOp>::Jacobian: Sync,
<O as ArgminOp>::Param: Sync,
<O as ArgminOp>::Hessian: Sync,
<O as ArgminOp>::Jacobian: Sync,
<O as ArgminOp>::Param: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> SendSyncRefUnwindSafeKV for T where
T: KV + Send + Sync + RefUnwindSafe + ?Sized,
T: KV + Send + Sync + RefUnwindSafe + ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,