Struct gmt_dos_clients::integrator::Integrator

source ·
pub struct Integrator<U: UniqueIdentifier> { /* private fields */ }
Expand description

Integral controller

Implementations§

source§

impl<T, U> Integrator<U>
where T: Default + Clone, U: UniqueIdentifier<DataType = Vec<T>>,

source

pub fn new(n_data: usize) -> Self

Creates a new integral controller

source

pub fn gain(self, gain: T) -> Self

Sets a unique gain

source

pub fn skip(self, n: usize) -> Self

Skips the first n data

Skip is always applied after chunks

source

pub fn chunks(self, n: usize) -> Self

Process the data by chunks of size n

source

pub fn gain_vector(self, gain: Vec<T>) -> Self

Sets the gain vector

source

pub fn forgetting_factor(self, leak: T) -> Self

Set the forgetting factor for the leaky integrator

source

pub fn zero(self, zero: Vec<T>) -> Self

Sets the integrator zero point

source

pub fn set_gain(&mut self, gain: T) -> &mut Self

Sets the gain

Trait Implementations§

source§

impl<U: Clone + UniqueIdentifier> Clone for Integrator<U>
where U::DataType: Clone,

source§

fn clone(&self) -> Integrator<U>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<U: Debug + UniqueIdentifier> Debug for Integrator<U>
where U::DataType: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T, U, O> Read<Offset<O>> for Integrator<U>
where O: UniqueIdentifier<DataType = Vec<T>>, U: UniqueIdentifier<DataType = Vec<T>>, T: Copy + Mul<Output = T> + Sub<Output = T> + SubAssign + AddAssign + Debug + Send + Sync,

source§

fn read(&mut self, data: Data<Offset<O>>)

Read data from an input
source§

impl<T, U> Read<U> for Integrator<U>
where T: Copy + Mul<Output = T> + Sub<Output = T> + SubAssign + AddAssign + Debug + Send + Sync, U: UniqueIdentifier<DataType = Vec<T>>,

source§

fn read(&mut self, data: Data<U>)

Read data from an input
source§

impl<T, U> Update for Integrator<U>
where T: Copy + Mul<Output = T> + Sub<Output = T> + SubAssign + AddAssign + Debug + Send + Sync, U: UniqueIdentifier<DataType = Vec<T>>,

source§

fn update(&mut self)

source§

impl<T, V, U> Write<V> for Integrator<U>
where T: Copy + Mul<Output = T> + Sub<Output = T> + SubAssign + Add + AddAssign + Debug + Send + Sync, V: UniqueIdentifier<DataType = Vec<T>>, U: UniqueIdentifier<DataType = Vec<T>>, Vec<T>: FromIterator<<T as Add>::Output>,

source§

fn write(&mut self) -> Option<Data<V>>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.