Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
MembershipFunction.h
00001 #ifndef MF_H 00002 #define MF_H 00003 00004 #include <stdlib.h> 00005 00006 #define NULL 0 00007 00008 enum mfType {TRIMF, TRAPMF, GUASSMF}; 00009 00010 class MembershipFunction 00011 { 00012 public: 00013 MembershipFunction(mfType type, float a, float b, float c, float d, float u, float v); 00014 MembershipFunction(mfType type); 00015 virtual ~MembershipFunction(void); 00016 00017 float getValue(float x); 00018 void setValues(float a, float b, float c); 00019 void setValues(float a, float b, float c, float d); 00020 void setValues(float u, float v); 00021 00022 float centroid(float h); 00023 00024 private: 00025 mfType type; 00026 00027 float a, b, c, d; 00028 float u, v; 00029 00030 float trimf(float x); 00031 float trapmf(float x); 00032 float guassmf(float x); 00033 }; 00034 00035 #endif
Generated on Tue Jul 19 2022 01:26:58 by
1.7.2