Fuzzy libray for embedded targets developed by zerokol. Read more on: http://zerokol.com/product/51e93616e84c5571b7000018/2/en edit by Bruno Alfano - corrected deallocation of FuzzyOutput

Fuzzy library by Zerokol. Read more on: http://zerokol.com/product/51e93616e84c5571b7000018/2/en

edit by Bruno Alfano - corrected deallocation bug for FuzzyOutput

FuzzyRuleConsequent.h

Committer:
astaff15
Date:
2015-06-24
Revision:
0:66cd67db4f1b

File content as of revision 0:66cd67db4f1b:

/*
 * Robotic Research Group (RRG)
 * State University of Piaui (UESPI), Brazil - Piauí - Teresina
 *
 * FuzzyRuleConsequent.h
 *
 *      Author: Msc. Marvin Lemos <marvinlemos@gmail.com>
 *              AJ Alves <aj.alves@zerokol.com>
 *          Co authors: Douglas S. Kridi <douglaskridi@gmail.com>
 *                      Kannya Leal <kannyal@hotmail.com>
 */
#ifndef FUZZYRULECONSEQUENT_H
#define FUZZYRULECONSEQUENT_H

// IMPORTANDO AS BIBLIOTECAS NECESSÁRIAS
#include <stdlib.h>
#include "FuzzySet.h"

// Estrutura de uma lista de FuzzySet
struct fuzzySetOutputArray{
    FuzzySet* fuzzySet;
    fuzzySetOutputArray* next;
};

class FuzzyRuleConsequent {
    public:
        // CONSTRUTORES
        FuzzyRuleConsequent();
        // DESTRUTOR
        ~FuzzyRuleConsequent();
        // MÉTODOS PÚBLICOS
        bool addOutput(FuzzySet* fuzzySet);
        bool evaluate(float power);

    private:
        // VARIÁVEIS PRIVADAS
        fuzzySetOutputArray* fuzzySetOutputsCursor;
        fuzzySetOutputArray* fuzzySetOutputs;
        // MÉTODOS PRIVADOS
        void cleanFuzzySets(fuzzySetOutputArray* aux);
};
#endif