pub struct TargetPool { /* private fields */ }Expand description
Ordered target anchors and the boundaries halfway between them.
Implementations§
Source§impl TargetPool
impl TargetPool
Sourcepub fn new(targets: Vec<ModelId>, positions: Vec<f64>) -> Result<Self>
pub fn new(targets: Vec<ModelId>, positions: Vec<f64>) -> Result<Self>
Targets in increasing score order. An empty line uses evenly spaced anchors.
Sourcepub fn target_count(&self) -> usize
pub fn target_count(&self) -> usize
Number of targets on the score line.
Sourcepub fn confidence(&self, value: f64) -> Result<f64>
pub fn confidence(&self, value: f64) -> Result<f64>
Distance from the nearest midpoint, normalized within its adjacent interval. Zero is ambiguous; one is an anchor. This reduces to abs(2*p - 1) for two targets.
Trait Implementations§
Source§impl Clone for TargetPool
impl Clone for TargetPool
Source§fn clone(&self) -> TargetPool
fn clone(&self) -> TargetPool
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 moreAuto Trait Implementations§
impl Freeze for TargetPool
impl RefUnwindSafe for TargetPool
impl Send for TargetPool
impl Sync for TargetPool
impl Unpin for TargetPool
impl UnsafeUnpin for TargetPool
impl UnwindSafe for TargetPool
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