-
Notifications
You must be signed in to change notification settings - Fork 1
/
FuzzyApprox.h
62 lines (54 loc) · 1.67 KB
/
FuzzyApprox.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//Fuzzy Function Approximation
#ifndef FuzzyApprox_H
#define FuzzyApprox_H
#include <vector>
#include "common.h"
#include "processor.h"
#include "mem_hierarchy.h"
#include "RuleList.h"
#include "FunctionApprox.h"
#include <time.h>
#define ERR_MEMORY 20
class CFuzzyFunctionApproximation : public CFunctionApproximation {
public:
CFuzzyFunctionApproximation();
~CFuzzyFunctionApproximation();
bool Init(double _threshold, int min, int max, int nouts);
bool FuzzySetsInit(const vector<pair<int,int> >& min_max);
bool StartUp(int MaxNumberOfRules, double threshold, int _min, int _max);
bool Learn(double* InputValues, double* OutputValues);
bool Learn(Configuration conf,Simulation sim,Processor& p,Mem_hierarchy& mem);
bool Learn(const Configuration& conf,const Dynamic_stats& dyn);
bool GenerateInputFuzzySets(int Dimensionality, int* InputFuzzySetsNumberVector, double *InMinimumValuesVector, double *InMaximumValuesVector);
bool EstimateG(double* InputValues,double* OutputVector);
Simulation Estimate1(Configuration conf,Processor& p,Mem_hierarchy& mem);
Dynamic_stats Estimate2(Configuration conf);
bool Reliable();
int GetSystem();
void Clean();
private:
int position();
int InDim,OutDim;
int *InputSetsNumber;
double *InputsMin;
double *InputsMax;
double *InputCenters;
CRuleList *RuleTable;
Rule newRule;
double *estimatedValues;
double *degrees;
double *alpha;
int *Sets;
int count;
bool calcola;
double *errore;
double **errmatrix;
int prove;
double *stima;
double threshold;
int min_sims,max_sims;
int posx;
FILE* fuzzy_log;
FILE* fuzzy_error;
};
#endif