phuzzy
Rilisan Pertama
phuzzy是一个用于模糊算法的 PHP 库
composer require techarea/ phuzzy
$ phuzzy = new Techarea phuzzy phuzzy ;
$ phuzzy -> setInputNames ([ ' var1 ' , ' var2 ' ]);
$ phuzzy -> setOutputNames ([ ' var1 ' , ' var2 ' ]);
设置类型:'LEFT_INFINITY'、'TRIANGLE'、'TRAPEZOID'、'RIGHT_INFINITY'
所有点都是整数/浮点数,除了中间点可以是数组(如果类型为“TRAPEZOID”)
$ phuzzy -> addMember ( ' variabel ' , ' himpunan ' , ' titik_awal ' , ' titik_tengah ' , ' titik_akhir ' , ' tipe_himpunan ' );
$ phuzzy -> addRule ( ' IF variabel.himpunan AND variabel.himpunan THEN variabel.himpunan ' );
$ phuzzy -> setRealInput ( ' variabel ' , ' nilai ' );
$ result = $ phuzzy -> Execute ();