pub struct DataPoint { /* private fields */ }Expand description
One observation of one feature: the instance id, its value and its label.
Implementations§
Source§impl DataPoint
impl DataPoint
Sourcepub fn new(tid: usize, value: f64, label: f64) -> Self
pub fn new(tid: usize, value: f64, label: f64) -> Self
An observation of instance tid, not yet indexed.
pub fn tid(&self) -> usize
pub fn value(&self) -> f64
pub fn label(&self) -> f64
Sourcepub fn set_unique_value_id(&mut self, value: usize)
pub fn set_unique_value_id(&mut self, value: usize)
Sets the index of the value among the column’s distinct values.
Sourcepub fn unique_value_id(&self) -> usize
pub fn unique_value_id(&self) -> usize
The index of the value among the column’s distinct values.
Trait Implementations§
impl Copy for DataPoint
impl Eq for DataPoint
Source§impl Ord for DataPoint
impl Ord for DataPoint
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Auto Trait Implementations§
impl Freeze for DataPoint
impl RefUnwindSafe for DataPoint
impl Send for DataPoint
impl Sync for DataPoint
impl Unpin for DataPoint
impl UnsafeUnpin for DataPoint
impl UnwindSafe for DataPoint
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