Flex.Rule (FLex v0.2.2)

View Source

An interface to create Linguistic Rules.

Summary

Types

t()

Linguistic Rule struct.

Functions

Fuzzy AND operator.

Fuzzy THEN operator.

Gets the arguments of the Fuzzy Rule

Creates a Linguistic Rule.

Fuzzy Rules AST (Tuple).

Fuzzy AND operator (product).

Fuzzy OR operator.

Fuzzy IS operator.

Types

t()

@type t() :: %Flex.Rule{
  antecedent: [Flex.Variable.t(), ...],
  consequent: Flex.Variable.t(),
  statement: fun() | tuple()
}

Linguistic Rule struct.

  • :statement - Rules behavior.
  • :antecedent - (list) Input variables.
  • :consequent - Output variable.

Functions

a &&& b

Fuzzy AND operator.

a >>> b

Fuzzy THEN operator.

get_rule_parameters(list, antecedent, lt_ant_vars)

Gets the arguments of the Fuzzy Rule

new(params)

Creates a Linguistic Rule.

The following options are require:

  • :statement - Defines the rule behavior.
  • :antecedent - (list) Defines the input variables.
  • :consequent - Defines the output variable.

statement(arg, args)

Fuzzy Rules AST (Tuple).

tau(a, b)

Fuzzy AND operator (product).

a ||| b

Fuzzy OR operator.

a ~> b

Fuzzy IS operator.