Struct argmin::core::executor::Executor [−][src]
Executes a solver
Fields
op: OpWrapper<O>
operator
Implementations
impl<O, S> Executor<O, S> where
O: ArgminOp,
S: Solver<O>,
[src]
O: ArgminOp,
S: Solver<O>,
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]
Self: Sized + DeserializeOwned,
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]
self,
observer: OBS,
mode: ObserverMode
) -> Self
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]
IterState<O>: Serialize,
S: Deserialize<'de>,
O: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<O: ArgminOp, S> Serialize for Executor<O, S> where
IterState<O>: Serialize,
S: Serialize,
[src]
IterState<O>: Serialize,
S: Serialize,
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,
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,
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,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,