FuzzyControllerBuilder

Struct FuzzyControllerBuilder 

Source
pub struct FuzzyControllerBuilder<D: Float, M: Float> { /* private fields */ }
Expand description

Builder for fuzzy controller

Implementations§

Source§

impl<D: Float, M: Float> FuzzyControllerBuilder<D, M>

Source

pub fn new() -> Self

Creates a new fuzzy controller builder.

Source

pub fn add_input(self, variable: LinguisticVariable<D, M>) -> Self

Adds an input linguistic variable to the controller.

Source

pub fn add_output(self, variable: LinguisticVariable<D, M>) -> Self

Adds an output linguistic variable to the controller.

Source

pub fn add_rule(self, rule: FuzzyRule<D, M>) -> Self

Adds a fuzzy rule to the controller.

Source

pub fn with_t_norm(self, t_norm: Box<dyn TNorm<M>>) -> Self

Sets the T-norm operator for combining rule antecedents with AND.

Source

pub fn with_s_norm(self, s_norm: Box<dyn SNorm<M>>) -> Self

Sets the S-norm operator for combining rule antecedents with OR.

Source

pub fn add_inputs(self, variables: Vec<LinguisticVariable<D, M>>) -> Self

Adds multiple input variables at once.

Source

pub fn add_outputs(self, variables: Vec<LinguisticVariable<D, M>>) -> Self

Adds multiple output variables at once.

Source

pub fn add_rules(self, rules: Vec<FuzzyRule<D, M>>) -> Self

Adds multiple rules at once.

Source

pub fn build(self) -> FuzzyController<D, M>

Builds the fuzzy controller with the configured settings.

Trait Implementations§

Source§

impl<D: Float, M: Float> Default for FuzzyControllerBuilder<D, M>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<D, M> Freeze for FuzzyControllerBuilder<D, M>

§

impl<D, M> !RefUnwindSafe for FuzzyControllerBuilder<D, M>

§

impl<D, M> !Send for FuzzyControllerBuilder<D, M>

§

impl<D, M> !Sync for FuzzyControllerBuilder<D, M>

§

impl<D, M> Unpin for FuzzyControllerBuilder<D, M>
where M: Unpin, D: Unpin,

§

impl<D, M> !UnwindSafe for FuzzyControllerBuilder<D, M>

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.