Skip to main content

Biased

Trait Biased 

Source
pub trait Biased<S, D, A = <S as RawData>::Elem>: Weighted<S, D, A>
where D: Dimension, S: RawData<Elem = A>,
{ // Required methods fn bias(&self) -> &ArrayBase<S, D::Smaller, A>; fn bias_mut(&mut self) -> &mut ArrayBase<S, D::Smaller, A>; // Provided methods fn assign_bias(&mut self, bias: &ArrayBase<S, D::Smaller, A>) -> &mut Self where S: DataMut, S::Elem: Clone { ... } fn replace_bias( &mut self, bias: ArrayBase<S, D::Smaller, A>, ) -> ArrayBase<S, D::Smaller, A> { ... } fn set_bias(&mut self, bias: ArrayBase<S, D::Smaller, A>) -> &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, A>

returns the bias of the model

Source

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

returns a mutable reference to the bias of the model

Provided Methods§

Source

fn assign_bias(&mut self, bias: &ArrayBase<S, D::Smaller, A>) -> &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, A>, ) -> ArrayBase<S, D::Smaller, A>

replaces the current bias with the given bias

Source

fn set_bias(&mut self, bias: ArrayBase<S, D::Smaller, A>) -> &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".

Implementors§

Source§

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