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<SparseFeatures> for SparseFeatures
impl AbsDiffEq<SparseFeatures> 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 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 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<SparseFeatures> for SparseFeatures
impl PartialEq<SparseFeatures> for SparseFeatures
source§fn eq(&self, other: &SparseFeatures) -> bool
fn eq(&self, other: &SparseFeatures) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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 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