diff --git a/qfis_desc.html b/qfis_desc.html index aaade18..39bee93 100644 --- a/qfis_desc.html +++ b/qfis_desc.html @@ -284,7 +284,7 @@

  • THEN to represent the implication
  • Let's apply some of these statements to build the rule set.

    -
    static const fis::rules rules[] = {
    +
    static const fis::rules rules[] = {
    IF service IS service_poor OR food IS food_rancid THEN tip IS tip_cheap END
    IF service IS service_good THEN tip IS tip_average END
    @@ -327,7 +327,7 @@

    If we already have a fuzzy system configured with qlibs::fis::instance::setup(), we can evaluate it by using qlibs::fis::instance::fuzzify(), qlibs::fis::instance::inference() and qlibs::fis::instance::deFuzzify(). Input values can be set with qlibs::fis::instance::setInput() and output values can be obtained with qlibs::fis::instance::getOutput(). Also you can use the stream operator << to set the inputs and the index operator [] to get the outputs of the FIS system (see example bellow).

    To show its use, first we are going to put everything together in a single code snippet and we are going to create two functions, tipper_init() and tipper_run() that will be in charge of setting up the fuzzy inference system and evaluating it respectively.

    #include "tipper_fis.h"
    -
    #include "qfis.h"
    +
    #include <qlibs.h>
    // I/O Names
    enum : fis::tag { service, food};
    diff --git a/qltisys_desc.html b/qltisys_desc.html index b46f40a..e49f7ad 100644 --- a/qltisys_desc.html +++ b/qltisys_desc.html @@ -238,7 +238,7 @@

    { 0.1f, 0.2f, 0.3f },
    { 1.0f, -0.85f, 0.02f },
    };
    -
    continuousSystem gc( dtf );
    +
    discreteSystem gc( dtf );
    real_t uk, yk;
    for( ;; ) {