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

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

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)

Trait Implementations

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

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

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

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]

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.

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