pub struct SparseFeatures { /* private fields */ }
Implementations§
Source§impl SparseFeatures
impl SparseFeatures
pub fn namespaces(&self) -> NamespacesIterator<'_> ⓘ
pub fn quadratic_features( &self, ns1: Namespace, ns2: Namespace, num_bits: u8, ) -> Option<impl Iterator<Item = (FeatureIndex, f32)> + '_>
pub fn cubic_features( &self, ns1: Namespace, ns2: Namespace, ns3: Namespace, num_bits: u8, ) -> Option<impl Iterator<Item = (FeatureIndex, f32)> + '_>
pub fn all_features(&self) -> impl Iterator<Item = (FeatureIndex, f32)> + '_
pub fn new() -> SparseFeatures
pub fn get_namespace( &self, namespace: Namespace, ) -> Option<&SparseFeaturesNamespace>
pub fn get_namespace_mut( &mut self, namespace: Namespace, ) -> Option<&mut SparseFeaturesNamespace>
pub fn clear(&mut self)
pub fn get_or_create_namespace( &mut self, namespace: Namespace, ) -> &mut SparseFeaturesNamespace
pub fn get_or_create_namespace_with_capacity( &mut self, namespace: Namespace, capacity: usize, ) -> &mut SparseFeaturesNamespace
pub fn append(&mut self, other: &SparseFeatures)
pub fn remove(&mut self, other: &SparseFeatures)
pub fn empty(&self) -> bool
Trait Implementations§
Source§impl AbsDiffEq for SparseFeatures
impl AbsDiffEq for SparseFeatures
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 AsInner<SparseFeatures> for Features<'_>
impl AsInner<SparseFeatures> for Features<'_>
fn as_inner(&self) -> Option<&SparseFeatures>
fn as_inner_mut(&mut self) -> Option<&mut SparseFeatures>
Source§impl Clone for SparseFeatures
impl Clone for SparseFeatures
Source§fn clone(&self) -> SparseFeatures
fn clone(&self) -> SparseFeatures
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 SparseFeatures
impl Debug for SparseFeatures
Source§impl Default for SparseFeatures
impl Default for SparseFeatures
Source§impl<'a> From<&'a mut SparseFeatures> for Features<'a>
impl<'a> From<&'a mut SparseFeatures> for Features<'a>
Source§fn from(f: &'a mut SparseFeatures) -> Features<'a>
fn from(f: &'a mut SparseFeatures) -> Features<'a>
Converts to this type from the input type.
Source§impl From<SparseFeatures> for Features<'_>
impl From<SparseFeatures> for Features<'_>
Source§fn from(f: SparseFeatures) -> Self
fn from(f: SparseFeatures) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SparseFeatures
impl PartialEq for SparseFeatures
Source§impl PoolReturnable<SparseFeatures> for CBAdfFeatures
impl PoolReturnable<SparseFeatures> for CBAdfFeatures
fn clear_and_return_object(self, pool: &Pool<SparseFeatures>)
Source§impl PoolReturnable<SparseFeatures> for Features<'_>
impl PoolReturnable<SparseFeatures> for Features<'_>
fn clear_and_return_object(self, pool: &Pool<SparseFeatures>)
Source§impl PoolReturnable<SparseFeatures> for SparseFeatures
impl PoolReturnable<SparseFeatures> for SparseFeatures
fn clear_and_return_object(self, pool: &Pool<SparseFeatures>)
Source§impl TryFrom<Features<'_>> for SparseFeatures
impl TryFrom<Features<'_>> for SparseFeatures
impl StructuralPartialEq for SparseFeatures
Auto Trait Implementations§
impl Freeze for SparseFeatures
impl RefUnwindSafe for SparseFeatures
impl Send for SparseFeatures
impl Sync for SparseFeatures
impl Unpin for SparseFeatures
impl UnwindSafe for SparseFeatures
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