pub struct DenseWeights { /* private fields */ }
Implementations§
Source§impl DenseWeights
impl DenseWeights
pub fn new( feature_index_size: FeatureIndex, model_index_size: ModelIndex, feature_state_size: StateIndex, ) -> Result<DenseWeights>
Trait Implementations§
Source§impl AbsDiffEq for DenseWeights
impl AbsDiffEq for DenseWeights
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 DenseWeights
impl Clone for DenseWeights
Source§fn clone(&self) -> DenseWeights
fn clone(&self) -> DenseWeights
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 DenseWeights
impl Debug for DenseWeights
Source§impl<'de> Deserialize<'de> for DenseWeights
impl<'de> Deserialize<'de> for DenseWeights
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DenseWeights
impl PartialEq for DenseWeights
Source§impl Serialize for DenseWeights
impl Serialize for DenseWeights
Source§impl Weights for DenseWeights
impl Weights for DenseWeights
fn weight_at(&self, feature_index: FeatureIndex, model_index: ModelIndex) -> f32
fn weight_at_mut( &mut self, feature_index: FeatureIndex, model_index: ModelIndex, ) -> &mut f32
fn state_at( &self, feature_index: FeatureIndex, model_index: ModelIndex, ) -> &[f32]
fn state_at_mut( &mut self, feature_index: FeatureIndex, model_index: ModelIndex, ) -> &mut [f32]
impl StructuralPartialEq for DenseWeights
Auto Trait Implementations§
impl Freeze for DenseWeights
impl RefUnwindSafe for DenseWeights
impl Send for DenseWeights
impl Sync for DenseWeights
impl Unpin for DenseWeights
impl UnwindSafe for DenseWeights
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