Struct rv::process::RandomProcessMleOp
source · pub struct RandomProcessMleOp<P, X>{ /* private fields */ }
Expand description
Random Process Optimization target for Argmin
Implementations§
source§impl<P, X> RandomProcessMleOp<P, X>
impl<P, X> RandomProcessMleOp<P, X>
Trait Implementations§
source§impl<P, X> CostFunction for RandomProcessMleOp<P, X>
impl<P, X> CostFunction for RandomProcessMleOp<P, X>
§type Param = Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>
type Param = Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>
Type of the parameter vector
source§fn bulk_cost<P>(&self, params: &[P]) -> Result<Vec<Self::Output>, Error>
fn bulk_cost<P>(&self, params: &[P]) -> Result<Vec<Self::Output>, Error>
Compute
cost
in bulk. If the rayon
feature is enabled, multiple calls to cost
will be run in parallel using rayon
, otherwise they will execute sequentially. If the rayon
feature is enabled, parallelization can still be turned off by overwriting parallelize
to return false
. This can be useful in cases where it is preferable to parallelize only certain parts. Note that even if parallelize
is set to false, the parameter vectors and the problem are still required to be Send
and Sync
. Those bounds are linked to the rayon
feature. This method can be overwritten.source§fn parallelize(&self) -> bool
fn parallelize(&self) -> bool
Indicates whether to parallelize calls to
cost
when using bulk_cost
. By default returns true, but can be set manually to false
if needed. This allows users to turn off parallelization for certain traits implemented on their problem. Note that parallelization requires the rayon
feature to be enabled, otherwise calls to cost
will be executed sequentially independent of how parallelize
is set.source§impl<P, X> Gradient for RandomProcessMleOp<P, X>
impl<P, X> Gradient for RandomProcessMleOp<P, X>
§type Param = Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>
type Param = Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>
Type of the parameter vector
source§fn bulk_gradient<P>(&self, params: &[P]) -> Result<Vec<Self::Gradient>, Error>
fn bulk_gradient<P>(&self, params: &[P]) -> Result<Vec<Self::Gradient>, Error>
Compute
gradient
in bulk. If the rayon
feature is enabled, multiple calls to gradient
will be run in parallel using rayon
, otherwise they will execute sequentially. If the rayon
feature is enabled, parallelization can still be turned off by overwriting parallelize
to return false
. This can be useful in cases where it is preferable to parallelize only certain parts. Note that even if parallelize
is set to false, the parameter vectors and the problem are still required to be Send
and Sync
. Those bounds are linked to the rayon
feature. This method can be overwritten.source§fn parallelize(&self) -> bool
fn parallelize(&self) -> bool
Indicates whether to parallelize calls to
gradient
when using bulk_gradient
. By default returns true, but can be set manually to false
if needed. This allows users to turn off parallelization for certain traits implemented on their problem. Note that parallelization requires the rayon
feature to be enabled, otherwise calls to gradient
will be executed sequentially independent of how parallelize
is set.Auto Trait Implementations§
impl<P, X> Freeze for RandomProcessMleOp<P, X>where
P: Freeze,
impl<P, X> RefUnwindSafe for RandomProcessMleOp<P, X>where
P: RefUnwindSafe,
X: RefUnwindSafe,
impl<P, X> Send for RandomProcessMleOp<P, X>
impl<P, X> Sync for RandomProcessMleOp<P, X>
impl<P, X> Unpin for RandomProcessMleOp<P, X>
impl<P, X> UnwindSafe for RandomProcessMleOp<P, X>where
P: UnwindSafe,
X: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.