adt / cnf-evaluator
Installs: 9 804
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 16
Forks: 0
Open Issues: 0
This package is auto-updated.
Last update: 2024-10-26 09:02:25 UTC
README
Cnf = Conjunctive normal form.
Komponenta na vyhodnocování konjunktní normální formy. Projde pole opravdových hodnot a pole boolean hodnot jednotlivých callbacků, pokud se jednotlivá pole shodují, provede callback.
Installation
The best way to install is using Composer:
$ composer require adt/cnf-evaluator
Usage
$cnf = new CnfEvaluator(); $cnf->addCallback(function() { ... }, [ "condition1" => TRUE, "condition2" => TRUE, "condition4" => FALSE, ]); $cnf->addCallback(function() { ... }, [ "condition1" => TRUE, "condition2" => TRUE, "condition4" => FALSE, ]); $cnf->setRealValues([ "condition1" => TRUE, "condition2" => FALSE, "condition3" => TRUE, "condition4" => FALSE, ]); $cnf->process();