WeightedDefuzzifier.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. Author: Juan Rada-Vilela, Ph.D.
  3. Copyright (C) 2010-2014 FuzzyLite Limited
  4. All rights reserved
  5. This file is part of fuzzylite.
  6. fuzzylite is free software: you can redistribute it and/or modify it under
  7. the terms of the GNU Lesser General Public License as published by the Free
  8. Software Foundation, either version 3 of the License, or (at your option)
  9. any later version.
  10. fuzzylite is distributed in the hope that it will be useful, but WITHOUT
  11. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
  13. for more details.
  14. You should have received a copy of the GNU Lesser General Public License
  15. along with fuzzylite. If not, see <http://www.gnu.org/licenses/>.
  16. fuzzylite™ is a trademark of FuzzyLite Limited.
  17. */
  18. #ifndef FL_WEIGHTEDDEFUZZIFIER_H
  19. #define FL_WEIGHTEDDEFUZZIFIER_H
  20. #include "fl/defuzzifier/Defuzzifier.h"
  21. namespace fl {
  22. class Activated;
  23. class FL_API WeightedDefuzzifier : public Defuzzifier {
  24. public:
  25. enum Type {
  26. Automatic, TakagiSugeno, Tsukamoto
  27. };
  28. static std::string typeName(Type);
  29. WeightedDefuzzifier(Type type = Automatic);
  30. WeightedDefuzzifier(const std::string& type);
  31. virtual ~WeightedDefuzzifier() FL_IOVERRIDE;
  32. FL_DEFAULT_COPY_AND_MOVE(WeightedDefuzzifier)
  33. virtual void setType(Type type);
  34. virtual Type getType() const;
  35. virtual std::string getTypeName() const;
  36. virtual Type inferType(const Term* term) const;
  37. virtual bool isMonotonic(const Term* term) const;
  38. virtual scalar tsukamoto(const Term* monotonic, scalar activationDegree,
  39. scalar minimum, scalar maximum) const;
  40. protected:
  41. Type _type;
  42. };
  43. }
  44. #endif /* FL_WEIGHTEDDEFUZZIFIER_H */