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 )where I1: Iterator<Item = FeatureIndex>, I2: Iterator<Item = f32>,
Trait Implementations§
source§impl Clone for SparseFeaturesNamespace
impl Clone for SparseFeaturesNamespace
source§fn clone(&self) -> SparseFeaturesNamespace
fn clone(&self) -> SparseFeaturesNamespace
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
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<SparseFeaturesNamespace> for SparseFeaturesNamespace
impl PartialEq<SparseFeaturesNamespace> for SparseFeaturesNamespace
source§fn eq(&self, other: &SparseFeaturesNamespace) -> bool
fn eq(&self, other: &SparseFeaturesNamespace) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SparseFeaturesNamespace
Auto Trait Implementations§
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