#[non_exhaustive]pub struct ConvergenceCriterion<F: Scalar = f64> {
pub test: ConvergenceTest,
pub evidence: ConvergenceEvidence<F>,
}Expand description
One precisely identified predicate and the measurements used to evaluate it.
Construct records with Self::new, Self::upper_bound, or Self::custom.
Fields remain public for reading, moving, and assignment; destructuring must
include ... Future optional metadata must default to behavior compatible
with existing constructors. Optional reporting metadata belongs on this
record so existing ConvergenceEvidence variant fields can stay fixed.
Struct literals are unavailable outside Basin:
ⓘ
use basin::{ConvergenceCriterion, ConvergenceEvidence, ConvergenceTest};
let criterion = ConvergenceCriterion::<f64> {
test: ConvergenceTest::NoFreeParameters,
evidence: ConvergenceEvidence::NoFreeParameters,
};Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.test: ConvergenceTestThe mathematical predicate that passed.
evidence: ConvergenceEvidence<F>Measurements from the stopping decision.
Implementations§
Source§impl<F: Scalar> ConvergenceCriterion<F>
impl<F: Scalar> ConvergenceCriterion<F>
Sourcepub fn new(test: ConvergenceTest, evidence: ConvergenceEvidence<F>) -> Self
pub fn new(test: ConvergenceTest, evidence: ConvergenceEvidence<F>) -> Self
Construct a predicate report from its identity and evidence.
Sourcepub fn upper_bound(
test: ConvergenceTest,
value: F,
bound: F,
tolerance: F,
reference: Option<F>,
) -> Self
pub fn upper_bound( test: ConvergenceTest, value: F, bound: F, tolerance: F, reference: Option<F>, ) -> Self
Construct a predicate report with its measured value and bound.
Trait Implementations§
Source§impl<'de, F> Deserialize<'de> for ConvergenceCriterion<F>where
F: Deserialize<'de> + Scalar,
Available on crate feature serde only.
impl<'de, F> Deserialize<'de> for ConvergenceCriterion<F>where
F: Deserialize<'de> + Scalar,
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<F> Serialize for ConvergenceCriterion<F>
Available on crate feature serde only.
impl<F> Serialize for ConvergenceCriterion<F>
Available on crate feature
serde only.impl<F: PartialEq + Scalar> StructuralPartialEq for ConvergenceCriterion<F>
Auto Trait Implementations§
impl<F> Freeze for ConvergenceCriterion<F>where
ConvergenceEvidence<F>: Freeze,
impl<F> RefUnwindSafe for ConvergenceCriterion<F>where
ConvergenceEvidence<F>: RefUnwindSafe,
impl<F> Send for ConvergenceCriterion<F>where
ConvergenceEvidence<F>: Send,
impl<F> Sync for ConvergenceCriterion<F>where
ConvergenceEvidence<F>: Sync,
impl<F> Unpin for ConvergenceCriterion<F>where
ConvergenceEvidence<F>: Unpin,
impl<F> UnsafeUnpin for ConvergenceCriterion<F>where
ConvergenceEvidence<F>: UnsafeUnpin,
impl<F> UnwindSafe for ConvergenceCriterion<F>where
ConvergenceEvidence<F>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T, U> Imply<T> for U
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar 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.