public class DataBase
extends java.lang.Object
Fuzzy Data Base
Constructor and Description |
---|
DataBase()
Default constructor
|
DataBase(int partitions,
int n_variables,
double[][] ranges,
java.lang.String[] names)
Constructor with parameters.
|
Modifier and Type | Method and Description |
---|---|
Fuzzy |
copy(int i,
int j,
int k)
It makes a copy of a fuzzy label
|
double |
covering(int partition,
int variable,
int label)
It returns the coverage of an specific fuzzy partition
|
int |
label(int ant)
It translates the antecedent id to a valid fuzzy label
|
double |
membership(int i,
int j,
int k,
double X)
It computes the membership degree for a input value
|
int |
numLabels()
It returns the number of fuzzy labels
|
int |
numVariables()
It returns the number of variables of the problem
|
int |
partition(int ant)
It translates the antecedent id to a valid partition
|
java.lang.String |
print_triangle(int var,
int label)
It prints the points of a fuzzy label
|
java.lang.String |
print(int var,
int label)
It prints the name of a fuzzy label
|
java.lang.String |
printString()
It prints the Data Base into an string
|
void |
saveFile(java.lang.String filename)
It writes the Data Base into an output file
|
public DataBase()
public DataBase(int partitions, int n_variables, double[][] ranges, java.lang.String[] names)
partitions
- int Number of fuzzy partitionsn_variables
- int Number of input variables of the problemranges
- double[][] ranges of each variable (minimum and maximum values)names
- String[] Labels for the input attributespublic int numVariables()
public int numLabels()
public double membership(int i, int j, int k, double X)
i
- int the input variable idj
- int the fuzzy label idk
- int the layer of the hierarchical DBX
- double the input valuepublic int partition(int ant)
ant
- int the antecedent idpublic int label(int ant)
ant
- int the antecedent idpublic double covering(int partition, int variable, int label)
partition
- int the partitionvariable
- int the variable idlabel
- int the fuzzy labelpublic Fuzzy copy(int i, int j, int k)
i
- int the input variable idj
- int the fuzzy label idk
- int the layer of the hierarchical DBpublic java.lang.String print_triangle(int var, int label)
var
- int variable idlabel
- int label idpublic java.lang.String print(int var, int label)
var
- int variable idlabel
- int label idpublic java.lang.String printString()
public void saveFile(java.lang.String filename)
filename
- String the name of the output file