pub struct Metrics { /* private fields */ }Expand description
The metrics of a link (see the module documentation).
Implementations§
Source§impl Metrics
impl Metrics
Sourcepub fn from_json(v: &Json) -> Result<Metrics>
pub fn from_json(v: &Json) -> Result<Metrics>
Parse the metrics mapping of a specification (null gives the defaults).
§Errors
Error::Config for an unknown metric, key or scaling.
Sourcepub fn record_frame(&self, s: &Frame, rec: &mut Record) -> Result<()>
pub fn record_frame(&self, s: &Frame, rec: &mut Record) -> Result<()>
Record what a trial of a link records after its blocks (crate::Link::trial):
the metrics of the frame (Metrics::record), then the values and the probes
that its blocks recorded. The Python chains record their frames with it.
§Errors
As Metrics::record.
Sourcepub fn record(&self, s: &Frame, rec: &mut Record) -> Result<()>
pub fn record(&self, s: &Frame, rec: &mut Record) -> Result<()>
Evaluate the metrics of one trial and record them.
§Errors
Error::Config for a coded metric without a coded link, or a signal that is
not at one sample per symbol aligned on the symbols; Error::Shape if the
window is empty.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
impl UnwindSafe for Metrics
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 more