Struct argmin::core::executor::Executor[][src]

pub struct Executor<O: ArgminOp, S> {
    pub op: OpWrapper<O>,
    // some fields omitted
}
Expand description

Executes a solver

Fields

op: OpWrapper<O>

operator

Implementations

impl<O, S> Executor<O, S> where
    O: ArgminOp,
    S: Solver<O>, 
[src]

pub fn new(op: O, solver: S, init_param: O::Param) -> Self[src]

Create a new executor with a solver and an initial parameter init_param

pub fn from_checkpoint<P: AsRef<Path>>(path: P, op: O) -> Result<Self, Error> where
    Self: Sized + DeserializeOwned
[src]

Create a new executor from a checkpoint

pub fn run(self) -> Result<ArgminResult<O>, Error>[src]

Run the executor

pub fn add_observer<OBS: Observe<O> + 'static>(
    self,
    observer: OBS,
    mode: ObserverMode
) -> Self
[src]

Attaches a observer which implements ArgminLog to the solver.

pub fn max_iters(self, iters: u64) -> Self[src]

Set maximum number of iterations

pub fn target_cost(self, cost: O::Float) -> Self[src]

Set target cost value

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

Set cost value

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

Set Gradient

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

Set Hessian

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

Set Jacobian

pub fn checkpoint_dir(self, dir: &str) -> Self[src]

Set checkpoint directory

pub fn checkpoint_name(self, dir: &str) -> Self[src]

Set checkpoint name

pub fn checkpoint_mode(self, mode: CheckpointMode) -> Self[src]

Set the checkpoint mode

pub fn ctrlc(self, ctrlc: bool) -> Self[src]

Turn Ctrl-C handling on or off (default: on)

pub fn timer(self, timer: bool) -> Self[src]

Turn timer on or off (default: on)

Trait Implementations

impl<O: Clone + ArgminOp, S: Clone> Clone for Executor<O, S>[src]

fn clone(&self) -> Executor<O, S>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'de, O: ArgminOp, S> Deserialize<'de> for Executor<O, S> where
    IterState<O>: Serialize,
    S: Deserialize<'de>,
    O: Default
[src]

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl<O: ArgminOp, S> Serialize for Executor<O, S> where
    IterState<O>: Serialize,
    S: Serialize
[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl<O, S> RefUnwindSafe for Executor<O, S> where
    O: RefUnwindSafe,
    S: RefUnwindSafe,
    <O as ArgminOp>::Float: RefUnwindSafe,
    <O as ArgminOp>::Hessian: RefUnwindSafe,
    <O as ArgminOp>::Jacobian: RefUnwindSafe,
    <O as ArgminOp>::Param: RefUnwindSafe

impl<O, S> !Send for Executor<O, S>

impl<O, S> !Sync for Executor<O, S>

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

impl<O, S> UnwindSafe for Executor<O, S> where
    O: UnwindSafe,
    S: UnwindSafe,
    <O as ArgminOp>::Float: UnwindSafe,
    <O as ArgminOp>::Hessian: UnwindSafe,
    <O as ArgminOp>::Jacobian: UnwindSafe,
    <O as ArgminOp>::Param: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

pub fn vzip(self) -> V

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]