A fuzzy logic C++ library
|
Visual test app for merging functions (t-norms and s-norms), see. More...
Defines | |
#define | VERT_MARGIN 45 |
Functions | |
void | SavePlot (slifis_plot::PLOT &plot, std::string pre, std::string post, size_t idx) |
int | main (int, char *argv[]) |
See demo2.cpp. | |
Variables | |
MEMBFUNC | base_mf [4] |
The 3 base functions. | |
int | active = 0 |
active function index, possible values: {0,1} | |
double | alpha_step = 0.1 |
Step for modifying levels. | |
double | shift [2] |
Horizontal shift value. | |
double | shift_step = 1.0 |
Horizontal shift step. | |
int | mf_type [2] |
Type of the three functions (2 points: =0, 3 points: =1, 4 points: =2) | |
double | ft_left [2] |
Left y value. | |
double | ft_middle [2] |
Middle y value (only for 4 points functions) | |
double | ft_right [2] |
Right y value. |
Visual test app for merging functions (t-norms and s-norms), see.
Using the gapi interface, it will show a plot of two functions, and on another plot, the corresponding merged function using one of the available t-norms or s-norms. The user can interact with several keyboard commands (see code), and visually check consistency.
#define VERT_MARGIN 45 |
Referenced by main().
void SavePlot | ( | slifis_plot::PLOT & | plot, |
std::string | pre, | ||
std::string | post, | ||
size_t | idx | ||
) |
References slifis_plot::PLOT::Save().
Referenced by main().
int main | ( | int | , |
char * | argv[] | ||
) |
See demo2.cpp.
References active, slifis::FUZZY_ROOT::AddMf(), alpha_step, APP_MSG, APP_NAME, APP_REGULAR_END, slifis_plot::PLOT::AssignWindow(), base_mf, slifis::FUZZY_ROOT::Clear(), slifis_plot::PLOT_FUZZY::Draw(), ft_left, ft_middle, ft_right, slifis::FuzzyMerge(), slifis_plot::GAPI_CreateWindow(), slifis_plot::GAPI_MoveWindow(), slifis_plot::GAPI_WaitKey(), slifis::MEMBFUNC::GetPoint(), slifis::GetString(), slifis::FPOINT::GetX(), slifis::MF_GAUSS, slifis::MF_HL, slifis::MF_LL, slifis::MF_TRI, mf_type, slifis::MEMBFUNC::ModifyPoint(), slifis::OPM_INVALID, REOPEN_STDERR, SavePlot(), slifis_plot::PLOT_FS::SelectMf(), slifis::MEMBFUNC::Set(), slifis::MEMBFUNC::SetLeftValue(), slifis::MEMBFUNC::SetName(), slifis::MEMBFUNC::SetRightValue(), slifis_plot::PLOT_FUZZY::SetScale(), shift, slifis::MEMBFUNC::Shift(), shift_step, slifis_plot::PLOT::Show(), and VERT_MARGIN.
double alpha_step = 0.1 |
Step for modifying levels.
Referenced by main().
double shift_step = 1.0 |
Horizontal shift step.
Referenced by main().
int mf_type[2] |
Type of the three functions (2 points: =0, 3 points: =1, 4 points: =2)
Referenced by main().