#include <fuzzygen.h>
Public Member Functions | |
void | combnumber () |
fuzzygen (void) | |
void | gener_allcomb (double *avi) |
void | gener_alphacuts (long alphid, double *avi) |
void | give_new_values (long sampleid, double *avi, FILE *out) |
void | read (XFILE *in) |
void | save_values (fuzzynum *fnum, long nprunknowns, double *avo) |
void | totcombnumber () |
~fuzzygen (void) | |
Public Attributes | |
long | actalph |
number of actual alpha-cut | |
long | actcomb |
number of actual combination in actual alpha-cut | |
double * | alpha |
array of required alpha-cuts | |
long * | aux |
fuzzynum * | fn |
fuzzy numbers | |
long | nalph |
number of alpha-cuts | |
long | ncomb |
number of combinations in one alpha-cut | |
long | nfv |
number of fuzzy variables | |
long | nval |
number of values | |
long | tncomb |
total number of combinations |
class fuzzygen
JK, 18.8.2005
Definition at line 14 of file fuzzygen.h.
fuzzygen | ( | void | ) |
void combnumber | ( | ) |
function computes number of combinations for given number of variables and for given alpha-cut
JK, 18.8.2005, revised 17.4.2007
Definition at line 112 of file fuzzygen.cpp.
Referenced by totcombnumber().
void gener_allcomb | ( | double * | avi | ) |
function generates combinations based on alpha cuts auxiliary array aux is used, aux contains nfv (number of fuzzy variables) components
JK, 9.10.2005
Definition at line 183 of file fuzzygen.cpp.
References aux, fn, fuzzynum::give_val(), nfv, and nval.
void gener_alphacuts | ( | long | alphid, | |
double * | avi | |||
) |
function generates combinations based on alpha-cuts
there are minimum and maximum values for given alpha aux[i]=0 means minimum value on the i-th variable aux[i]=1 means maximum value on the i-th variable the latest component of the array aux is changing fastest
alphid | - alpha-cut id | |
avi | - array of input values |
JK, 8.10.2005
Definition at line 136 of file fuzzygen.cpp.
References actcomb, alpha, aux, fn, fuzzynum::give_max(), fuzzynum::give_min(), ncomb, and nfv.
Referenced by give_new_values().
void give_new_values | ( | long | sampleid, | |
double * | avi, | |||
FILE * | out | |||
) |
function defines new input values in fuzzy computations
sampleid | - sample id | |
avi | - array of input values | |
out | - output stream |
JK, 17.4.2007
Definition at line 226 of file fuzzygen.cpp.
References actalph, actcomb, alpha, aux, gener_alphacuts(), nalph, ncomb, and nfv.
Referenced by stochdriver::assemble_new_values().
void read | ( | XFILE * | in | ) |
function reads input data
in | - input file |
JK, 18.8.2005
Definition at line 46 of file fuzzygen.cpp.
References alpha, aux, fn, nalph, nfv, nval, fuzzynum::onearray(), fuzzynum::read(), totcombnumber(), and xfscanf().
Referenced by stochdriver::read().
void save_values | ( | fuzzynum * | fnum, | |
long | nprunknowns, | |||
double * | avo | |||
) |
function saves results to fuzzy numbers
fnum | - array of fuzzy numbers for output | |
nprunknowns | - number of printed output variables | |
avo | - array of output values |
JK, 17.4.2007
Definition at line 274 of file fuzzygen.cpp.
References actalph, alpha, fuzzynum::give_max(), fuzzynum::give_min(), fuzzynum::save_alp_max(), and fuzzynum::save_alp_min().
Referenced by stochdriver::save_results().
void totcombnumber | ( | ) |
function computes total number of combinations for given number of variables and number of alpha-cuts
JK, 18.8.2005
Definition at line 96 of file fuzzygen.cpp.
References combnumber(), nalph, ncomb, and tncomb.
Referenced by read().
long actalph |
number of actual alpha-cut
Definition at line 44 of file fuzzygen.h.
Referenced by fuzzygen(), give_new_values(), save_values(), and stochdriver::update_auxparam().
long actcomb |
number of actual combination in actual alpha-cut
Definition at line 46 of file fuzzygen.h.
Referenced by fuzzygen(), gener_alphacuts(), give_new_values(), and stochdriver::update_auxparam().
double* alpha |
array of required alpha-cuts
Definition at line 50 of file fuzzygen.h.
Referenced by fuzzygen(), gener_alphacuts(), give_new_values(), stochdriver::read(), read(), save_values(), and ~fuzzygen().
long* aux |
Definition at line 52 of file fuzzygen.h.
Referenced by fuzzygen(), gener_allcomb(), gener_alphacuts(), give_new_values(), read(), and ~fuzzygen().
fuzzy numbers
Definition at line 55 of file fuzzygen.h.
Referenced by fuzzygen(), gener_allcomb(), gener_alphacuts(), read(), and ~fuzzygen().
long nalph |
number of alpha-cuts
Definition at line 34 of file fuzzygen.h.
Referenced by fuzzygen(), give_new_values(), stochdriver::read(), read(), and totcombnumber().
long ncomb |
number of combinations in one alpha-cut
Definition at line 39 of file fuzzygen.h.
Referenced by combnumber(), fuzzygen(), gener_alphacuts(), give_new_values(), totcombnumber(), and stochdriver::update_auxparam().
long nfv |
number of fuzzy variables
Definition at line 32 of file fuzzygen.h.
Referenced by combnumber(), fuzzygen(), gener_allcomb(), gener_alphacuts(), give_new_values(), stochdriver::read(), and read().
long nval |
number of values
Definition at line 36 of file fuzzygen.h.
Referenced by fuzzygen(), gener_allcomb(), and read().
long tncomb |
total number of combinations
Definition at line 41 of file fuzzygen.h.
Referenced by fuzzygen(), stochdriver::read(), and totcombnumber().