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

Committer:
astaff15
Date:
Wed Jun 24 15:08:13 2015 +0000
Revision:
2:460b409e26e8
Parent:
0:66cd67db4f1b
Corrected FuzzyOutput destructor bug

Who changed what in which revision?

UserRevisionLine numberNew contents of line
astaff15 0:66cd67db4f1b 1 /*
astaff15 0:66cd67db4f1b 2 * Robotic Research Group (RRG)
astaff15 0:66cd67db4f1b 3 * State University of Piaui (UESPI), Brazil - Piauí - Teresina
astaff15 0:66cd67db4f1b 4 *
astaff15 0:66cd67db4f1b 5 * FuzzyInput.cpp
astaff15 0:66cd67db4f1b 6 *
astaff15 0:66cd67db4f1b 7 * Author: Msc. Marvin Lemos <marvinlemos@gmail.com>
astaff15 0:66cd67db4f1b 8 * AJ Alves <aj.alves@zerokol.com>
astaff15 0:66cd67db4f1b 9 * Co authors: Douglas S. Kridi <douglaskridi@gmail.com>
astaff15 0:66cd67db4f1b 10 * Kannya Leal <kannyal@hotmail.com>
astaff15 0:66cd67db4f1b 11 */
astaff15 0:66cd67db4f1b 12 #include "FuzzyInput.h"
astaff15 0:66cd67db4f1b 13
astaff15 0:66cd67db4f1b 14 // CONSTRUTORES
astaff15 0:66cd67db4f1b 15 FuzzyInput::FuzzyInput() : FuzzyIO(){
astaff15 0:66cd67db4f1b 16 }
astaff15 0:66cd67db4f1b 17
astaff15 0:66cd67db4f1b 18 FuzzyInput::FuzzyInput(int index) : FuzzyIO(index){
astaff15 0:66cd67db4f1b 19 }
astaff15 0:66cd67db4f1b 20
astaff15 0:66cd67db4f1b 21 // DESTRUTOR
astaff15 0:66cd67db4f1b 22 FuzzyInput::~FuzzyInput(){
astaff15 0:66cd67db4f1b 23 }
astaff15 0:66cd67db4f1b 24
astaff15 0:66cd67db4f1b 25 // MÉTODOS PÚBLICOS
astaff15 0:66cd67db4f1b 26 bool FuzzyInput::calculateFuzzySetPertinences(){
astaff15 0:66cd67db4f1b 27 fuzzySetArray *aux;
astaff15 0:66cd67db4f1b 28 aux = this->fuzzySets;
astaff15 0:66cd67db4f1b 29
astaff15 0:66cd67db4f1b 30 while(aux != NULL){
astaff15 0:66cd67db4f1b 31 if (aux->fuzzySet != NULL){
astaff15 0:66cd67db4f1b 32 aux->fuzzySet->calculatePertinence(this->crispInput);
astaff15 0:66cd67db4f1b 33 }
astaff15 0:66cd67db4f1b 34 aux = aux->next;
astaff15 0:66cd67db4f1b 35 }
astaff15 0:66cd67db4f1b 36
astaff15 0:66cd67db4f1b 37 return true;
astaff15 0:66cd67db4f1b 38 }