A fuzzy logic C++ library
Defines | Functions | Variables
demo2.cpp File Reference

Visual test app for merging functions (t-norms and s-norms), see. More...

#include "app_common.hpp"
#include "slifis_gapi.hpp"
+ Include dependency graph for demo2.cpp:

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.

Detailed Description

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 Documentation

#define VERT_MARGIN   45

Referenced by main().


Function Documentation

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[] 
)

Variable Documentation

The 3 base functions.

Referenced by main().

int active = 0

active function index, possible values: {0,1}

Referenced by main().

double alpha_step = 0.1

Step for modifying levels.

Referenced by main().

double shift[2]

Horizontal shift value.

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().

double ft_left[2]

Left y value.

Referenced by main().

double ft_middle[2]

Middle y value (only for 4 points functions)

Referenced by main().

double ft_right[2]

Right y value.

Referenced by main().