public class variable_t
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
double |
Adaptation(double x)
Returns the adaptation degree of a certain value x to the variable.
|
double |
Adaptation(double x,
int etiqueta)
Returns the adaptation degree of a certain value x to the label "etiqueta" of the variable.
|
double |
Adaptation(double x,
java.lang.String etiquetas)
Returns the adaptation degree of a certain value x to a set of label "etiquetas" of the variable.
|
double |
Area(int l)
Returns the area of the label number "l" in the variable's domain.
|
double |
CenterLabel(int i)
Returns the central value of the label number "i" in the variable's domain.
|
domain_t |
Domain()
Returns a domain_t object with the definition of the variable's domain
|
fuzzy_t |
FuzzyLabel(int i)
Returns a fuzzy_t object with the definition of the label number "i" in the variable's domain.
|
double |
Inf_Range()
Returns the lower value of the definition interval of variable's domain.
|
boolean |
IsActive()
Returns if the variable is considered in the learning process.
|
boolean |
IsAntecedent()
Retuns if the variable is an antecedent of the rule.
|
boolean |
IsDiscrete()
Returns if the domain associated to the variable is only formed by crisp values.
|
boolean |
IsFuzzy()
Returns if the domain associated to the variable is only formed by fuzzy sets.
|
boolean |
IsInterval()
Returns if the domain associated to the variable is only formed by intervals.
|
int |
N_labels()
Returns the number of labels in the variable's domain.
|
void |
PrintDefinition()
Prints in the standard output the definition of the variable
|
java.lang.String |
PrintDefinitionToString()
Prints in a String the definition of the variable
|
void |
PrintDomain(int value)
Prints in the standard ouput the name of the label "value" of the variable.
|
void |
PrintVar()
Prints in the standard output the name of the variable
|
void |
Set(int n,
double inf,
double sup,
boolean menosinf,
boolean masinf,
java.lang.String name)
Defines a variable in an automatic way.
|
void |
Set(int n,
java.lang.String varname,
int status,
double inf,
double sup,
double[] a,
double[] b,
double[] c,
double[] d,
java.lang.String[] name)
Defines a variable based in a domain given as an ordered secuence of labels
( [a[i],b[i],c[i],d[i]] expresses the definition of the label i)
"inf" and "sup" are the lower and upper limits, respectively.
|
void |
Set(java.lang.String name,
int n,
java.lang.String[] nombres,
double[] ident)
Defines a variable in an automatic way.
|
int |
SizeDomain()
Retuns the number of labels in the variable's domain.
|
java.lang.String |
SPrintDomain(int value)
Returns a string with the name of the label "value" of the variable.
|
java.lang.String |
SPrintVar()
Returns a string with the name of the variable.
|
double |
Sup_Range()
Returns the upper value of the definition interval of variable's domain.
|
variable_t |
Variable()
Returns a copy of the variable
|
public void Set(int n, double inf, double sup, boolean menosinf, boolean masinf, java.lang.String name)
Defines a variable in an automatic way. The domain is uniformly defined with n labels in the rank [inf,sup]. It is posible to indicate if the domain's extremes are not delimited. "name" is the name of the variable. By defect, the variable is supposed to be an antecedent and it is considered in the learning process.
n
- int The number of label for the variableinf
- double The lower value for the variable rangesup
- double The upper value for the variable rangemenosinf
- boolean TRUE if the negative extreme is delimited. FALSE otherwisemasinf
- boolean TRUE if the positive extreme is delimited. FALSE otherwisename
- String The name of the variablepublic void Set(java.lang.String name, int n, java.lang.String[] nombres, double[] ident)
Defines a variable in an automatic way. USED FOR THE CONSEQUENT VARIABLE
name
- String The name of the variablen
- int The number of labels in the variablenombres
- String[] The names of the labels in the variableident
- double[] The a, b, c and d parameters for the labels in the variablepublic void Set(int n, java.lang.String varname, int status, double inf, double sup, double[] a, double[] b, double[] c, double[] d, java.lang.String[] name)
Defines a variable based in a domain given as an ordered secuence of labels ( [a[i],b[i],c[i],d[i]] expresses the definition of the label i) "inf" and "sup" are the lower and upper limits, respectively. "varname" is the name of the variable and "name" is a vector with the names of the labels. "status" is used to express the type of variable (-1 => antecedent variable and it is not active, 0 => antecedent variable and it is active. 1 => consequent variable and it is active).
n
- int The number of label for the variablevarname
- String The nambe of the variablestatus
- int -1 => antecedent variable and it is not active, 0 => antecedent variable and it is active. 1 => consequent variable and it is active.inf
- double The lower value for the variable rangesup
- double The upper value for the variable rangea
- double[] Parameter a for each labelb
- double[] Parameter b for each labelc
- double[] Parameter c for each labeld
- double[] Parameter d for each labelname
- String The name for each labelpublic double Adaptation(double x)
Returns the adaptation degree of a certain value x to the variable.
x
- double The valuepublic double Adaptation(double x, int etiqueta)
Returns the adaptation degree of a certain value x to the label "etiqueta" of the variable.
x
- double The valueetiqueta
- int The label in the domainpublic double Adaptation(double x, java.lang.String etiquetas)
Returns the adaptation degree of a certain value x to a set of label "etiquetas" of the variable. Param "etiquetas" is given as an ordered vector (String of strings) with zeros and ones representing the absence or the presence, respectively.
x
- double The valueetiquetas
- String The set of labels in the domainpublic java.lang.String PrintDefinitionToString()
Prints in a String the definition of the variable
public void PrintDefinition()
Prints in the standard output the definition of the variable
public void PrintVar()
Prints in the standard output the name of the variable
public java.lang.String SPrintVar()
Returns a string with the name of the variable.
public void PrintDomain(int value)
Prints in the standard ouput the name of the label "value" of the variable.
value
- int The label of the variablepublic java.lang.String SPrintDomain(int value)
Returns a string with the name of the label "value" of the variable.
value
- int The label of the variablepublic int SizeDomain()
Retuns the number of labels in the variable's domain.
public boolean IsActive()
Returns if the variable is considered in the learning process.
public boolean IsAntecedent()
Retuns if the variable is an antecedent of the rule.
public int N_labels()
Returns the number of labels in the variable's domain.
public fuzzy_t FuzzyLabel(int i)
Returns a fuzzy_t object with the definition of the label number "i" in the variable's domain.
i
- int The label numberpublic double CenterLabel(int i)
Returns the central value of the label number "i" in the variable's domain.
i
- int The label numberpublic boolean IsDiscrete()
Returns if the domain associated to the variable is only formed by crisp values.
public boolean IsInterval()
Returns if the domain associated to the variable is only formed by intervals.
public boolean IsFuzzy()
Returns if the domain associated to the variable is only formed by fuzzy sets.
public double Area(int l)
Returns the area of the label number "l" in the variable's domain.
l
- int The label numberpublic domain_t Domain()
Returns a domain_t object with the definition of the variable's domain
public variable_t Variable()
Returns a copy of the variable
public double Inf_Range()
Returns the lower value of the definition interval of variable's domain.
public double Sup_Range()
Returns the upper value of the definition interval of variable's domain.