Download the PHP package ifaqih/iffuzzy without Composer
On this page you can find all versions of the php package ifaqih/iffuzzy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ifaqih/iffuzzy
More information about ifaqih/iffuzzy
Files in ifaqih/iffuzzy
Package iffuzzy
Short Description Fuzzy Logic library for PHP based on the Mamdani, Sugeno or Tsukamoto methods.
License MIT
Informations about the package iffuzzy
Fuzzy
Fuzzy logic is a form of many-valued logic in which the truth value of variables may be any real number between 0 and 1. It is employed to handle the concept of partial truth, where the truth value may range between completely true and completely false. By contrast, in Boolean logic.
PHP Version: 8.0 or above |-
Installation
With Composer:
Use The Library
Constants:
Constant Name | Value | Description |
---|---|---|
FUZZY_METHOD_MAMDANI |
"MAMDANI" |
Using the Mamdani method |
FUZZY_METHOD_SUGENO |
"SUGENO" |
Using the Sugeno method |
FUZZY_METHOD_TSUKAMOTO |
"TSUKAMOTO" |
Using the Tsukamoto method |
FUZZY_MEMBERSHIP_LINEAR_UP |
10 |
Using ascending linear membership |
FUZZY_MEMBERSHIP_LINEAR_DOWN |
11 |
Using descending linear membership |
FUZZY_MEMBERSHIP_TRIANGLE |
12 |
Using triangular membership |
FUZZY_MEMBERSHIP_TRAPEZOID |
13 |
Using trapezoidal membership |
FUZZY_MEMBERSHIP_SIGMOID_UP |
14 |
Using ascending sigmoid membership |
FUZZY_MEMBERSHIP_SIGMOID_DOWN |
15 |
Using descending sigmoid membership |
FUZZY_MEMBERSHIP_PI |
16 |
Using pi membership |
Set Method
Setting the fuzzy method to be used.
- Type: static
- Parameter data type:
string $method_name
- Return data type:
object
Prototype:
Set Attribute
Set one attribute context.
- Type: static
- Parameter data type:
string $context_name, array $attributes, ?array $domain = null
- Return data type:
object
Prototype 1:
Prototype 2:
Set Attributes
Set multiple context attributes.
- Type: static
- Parameter data type:
array ...$attribute_each_context
- Return data type:
object
Prototype:
Set Rule
Set one rule.
- Type: static
- Parameter data type:
string $result, array $attribute
- Return data type:
object
Prototype:
Set Rules
Set multiple rule.
- Type: static
- Parameter data type:
array ...$rules
- Return data type:
object
Prototype:
Builder of Rules
In the set_rules()
method you can use builder
- Type: static
- Parameter data type: no needed
- Return data type:
object
Object of build method
Set Rule Name
- Type: static
- Parameter data
string|array $data
- Return data type:
object
Set Rule Name
- Type: static
- Parameter data
string $data, bool $is_formula = false
- Return data type:
array
Prototype:
Set Value
Set value of one context attribute.
- Type: static
- Parameter data type:
string $context_name, int|float $value
- Return data type:
object
Prototype:
Set Values
Set value of multiple context attribute.
- Type: static
- Parameter data type:
string $context_name, int|float $value
- Return data type:
object
Prototype:
Constant Flags
Constant Name | Value | Description |
---|---|---|
FUZZY_EXEC_HOLD |
1 |
Not reset all data after executed |
FUZZY_EXEC_GET_ALL |
2 |
Getting all data has been processed of library (in object values) |
FUZZY_EXEC_AS_ARRAY |
3 |
Getting all data has been processed of library in array values |
Executing Fuzzy Logic
Execute datas has been added from all of method.
- Type: static
- Parameter data type:
array|int $flags = 0
- Return data type:
int|float|object|array|null
Prototype:
Getting Value
Getting all data has been processed of library.
- Type: static
- Parameter data type:
int $flags = 0
- Return data type:
array|object
Prototype:
Clear Data
Clearing datas has been added or result of processed.
- Type: static
- Parameter data type: no needed
- Return data type:
void