Trait Biased

Source
pub trait Biased<S, D>: Weighted<S, D>
where D: Dimension, S: RawData,
{ // Required methods fn bias(&self) -> &ArrayBase<S, D::Smaller>; fn bias_mut(&mut self) -> &mut ArrayBase<S, D::Smaller>; // Provided methods fn assign_bias(&mut self, bias: &ArrayBase<S, D::Smaller>) -> &mut Self where S: DataMut, S::Elem: Clone { ... } fn replace_bias( &mut self, bias: ArrayBase<S, D::Smaller>, ) -> ArrayBase<S, D::Smaller> { ... } fn set_bias(&mut self, bias: ArrayBase<S, D::Smaller>) -> &mut Self { ... } fn iter_bias<'a>(&'a self) -> Iter<'a, S::Elem, D::Smaller> where S: Data + 'a, D: 'a { ... } fn iter_bias_mut<'a>(&'a mut self) -> IterMut<'a, S::Elem, D::Smaller> where S: DataMut + 'a, D: 'a { ... } }

Required Methods§

Source

fn bias(&self) -> &ArrayBase<S, D::Smaller>

returns the bias of the model

Source

fn bias_mut(&mut self) -> &mut ArrayBase<S, D::Smaller>

returns a mutable reference to the bias of the model

Provided Methods§

Source

fn assign_bias(&mut self, bias: &ArrayBase<S, D::Smaller>) -> &mut Self
where S: DataMut, S::Elem: Clone,

assigns the given bias to the current bias

Source

fn replace_bias( &mut self, bias: ArrayBase<S, D::Smaller>, ) -> ArrayBase<S, D::Smaller>

replaces the current bias with the given bias

Source

fn set_bias(&mut self, bias: ArrayBase<S, D::Smaller>) -> &mut Self

sets the bias of the model

Source

fn iter_bias<'a>(&'a self) -> Iter<'a, S::Elem, D::Smaller>
where S: Data + 'a, D: 'a,

returns an iterator over the bias

Source

fn iter_bias_mut<'a>(&'a mut self) -> IterMut<'a, S::Elem, D::Smaller>
where S: DataMut + 'a, D: 'a,

returns a mutable iterator over the bias

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<S, D> Biased<S, D> for ParamsBase<S, D>
where S: RawData, D: Dimension,