pub struct LikelihoodManager { /* private fields */ }Expand description
A Manager but for LikelihoodTerms.
Implementations§
Source§impl LikelihoodManager
impl LikelihoodManager
Sourcepub fn register(&mut self, term: Box<dyn LikelihoodTerm>) -> LikelihoodID
pub fn register(&mut self, term: Box<dyn LikelihoodTerm>) -> LikelihoodID
Register a LikelihoodTerm to get a LikelihoodID which can be combined with others
to form LikelihoodExpressions which can be minimized.
Sourcepub fn register_with_name<T: AsRef<str>>(
&mut self,
term: Box<dyn LikelihoodTerm>,
name: T,
) -> LikelihoodID
pub fn register_with_name<T: AsRef<str>>( &mut self, term: Box<dyn LikelihoodTerm>, name: T, ) -> LikelihoodID
Register (and name) a LikelihoodTerm to get a LikelihoodID which can be combined with others
to form LikelihoodExpressions which can be minimized.
Sourcepub fn parameters(&self) -> Vec<String>
pub fn parameters(&self) -> Vec<String>
Return all of the parameter names of registered LikelihoodTerms in order. This only
returns the unique names in the order they should be input when evaluated with a
LikelihoodEvaluator.
Sourcepub fn load(
&self,
likelihood_expression: &LikelihoodExpression,
) -> LikelihoodEvaluator
pub fn load( &self, likelihood_expression: &LikelihoodExpression, ) -> LikelihoodEvaluator
Load a LikelihoodExpression to generate a LikelihoodEvaluator that can be
minimized.
Trait Implementations§
Source§impl Clone for LikelihoodManager
impl Clone for LikelihoodManager
Source§fn clone(&self) -> LikelihoodManager
fn clone(&self) -> LikelihoodManager
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for LikelihoodManager
impl Default for LikelihoodManager
Source§fn default() -> LikelihoodManager
fn default() -> LikelihoodManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LikelihoodManager
impl !RefUnwindSafe for LikelihoodManager
impl Send for LikelihoodManager
impl Sync for LikelihoodManager
impl Unpin for LikelihoodManager
impl !UnwindSafe for LikelihoodManager
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<T> Pointable for T
impl<T> Pointable for T
Source§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.