pub struct SparseFeaturesNamespace { /* private fields */ }
Implementations§
Source§impl SparseFeaturesNamespace
impl SparseFeaturesNamespace
pub fn iter(&self) -> NamespaceIterator<'_> ⓘ
pub fn new(namespace: Namespace) -> SparseFeaturesNamespace
pub fn new_with_capacity( namespace: Namespace, capacity: usize, ) -> SparseFeaturesNamespace
pub fn size(&self) -> usize
pub fn namespace(&self) -> Namespace
pub fn reserve(&mut self, size: usize)
pub fn add_feature(&mut self, feature_index: FeatureIndex, feature_value: f32)
pub fn add_features( &mut self, feature_indices: &[FeatureIndex], feature_values: &[f32], )
pub fn add_features_with_iter<I1, I2>( &mut self, feature_indices: I1, feature_values: I2, )
Trait Implementations§
Source§impl AbsDiffEq for SparseFeaturesNamespace
impl AbsDiffEq for SparseFeaturesNamespace
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of
AbsDiffEq::abs_diff_eq
.Source§impl Clone for SparseFeaturesNamespace
impl Clone for SparseFeaturesNamespace
Source§fn clone(&self) -> SparseFeaturesNamespace
fn clone(&self) -> SparseFeaturesNamespace
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SparseFeaturesNamespace
impl Debug for SparseFeaturesNamespace
Source§impl PartialEq for SparseFeaturesNamespace
impl PartialEq for SparseFeaturesNamespace
Source§fn eq(&self, other: &SparseFeaturesNamespace) -> bool
fn eq(&self, other: &SparseFeaturesNamespace) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for SparseFeaturesNamespace
Auto Trait Implementations§
impl Freeze for SparseFeaturesNamespace
impl RefUnwindSafe for SparseFeaturesNamespace
impl Send for SparseFeaturesNamespace
impl Sync for SparseFeaturesNamespace
impl Unpin for SparseFeaturesNamespace
impl UnwindSafe for SparseFeaturesNamespace
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