Struct LabeledCurve
pub struct LabeledCurve {
pub label: String,
pub curve: LearningCurve,
}Expand description
A curve tagged with the role it plays in a scenario, for readable assertions.
The label is carried through onto every TrialOutcome
so a test can assert against "winner" or "dominated" rather than a bare
trial number.
Fields§
§label: StringThe role this curve plays ("winner", "deceptive", "dominated", …).
curve: LearningCurveThe curve itself.
Implementations§
§impl LabeledCurve
impl LabeledCurve
pub fn new(label: impl Into<String>, curve: LearningCurve) -> Self
pub fn new(label: impl Into<String>, curve: LearningCurve) -> Self
Tags curve with label.
pub fn repeated(label: &str, curve: &LearningCurve, count: usize) -> Vec<Self>
pub fn repeated(label: &str, curve: &LearningCurve, count: usize) -> Vec<Self>
count copies of curve, all tagged label — an easy way to build a
baseline population or a bank of identically-distributed noisy curves.
Trait Implementations§
§impl Clone for LabeledCurve
impl Clone for LabeledCurve
§fn clone(&self) -> LabeledCurve
fn clone(&self) -> LabeledCurve
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for LabeledCurve
impl Debug for LabeledCurve
§impl PartialEq for LabeledCurve
impl PartialEq for LabeledCurve
impl StructuralPartialEq for LabeledCurve
Auto Trait Implementations§
impl Freeze for LabeledCurve
impl RefUnwindSafe for LabeledCurve
impl Send for LabeledCurve
impl Sync for LabeledCurve
impl Unpin for LabeledCurve
impl UnsafeUnpin for LabeledCurve
impl UnwindSafe for LabeledCurve
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, U> Imply<T> for U
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 more