public class domain_t
extends java.lang.Object
Constructor and Description |
---|
domain_t()
Default Constructor
|
domain_t(domain_t x)
Creates a domain_t object as a copy of "x"
|
domain_t(int n,
double inf,
double sup,
boolean menosinf,
boolean masinf)
Constructor
|
Modifier and Type | Method and Description |
---|---|
double |
Adaptation(double x)
Returns the adaptation degree of a value x to the domain.
|
double |
Adaptation(double x,
int etiqueta)
Returns the adaptation degree of a value x to a specific label in the domain (this label is
given by its position in the domain).
|
double |
Adaptation(double x,
java.lang.String etiquetas)
Returns the adaptation degree of a value x to a set of label in the domain.
|
double |
Area(int l)
Returns the area of the label number l in the domain
|
double |
CenterLabel(int i)
Returns the central value of the label number i in the domain
|
domain_t |
Domain()
Returns an domain_t object with the domain
|
fuzzy_t |
FuzzyLabel(int i)
Returns the fuzzy label number i in the domain
|
double |
Inf_Range()
Returns the lower value for all the labels in the domain.
|
boolean |
IsDiscrete()
Returns if the domain_t object is formed by labels with all their domain been crisp.
|
boolean |
IsFuzzy()
Returns if the domain_t object is formed by labels with all their domain been fuzzy.
|
boolean |
IsInterval()
Returns if the domain_t object is formed by labels with all their domain been intervals.
|
int |
N_labels()
Returns the number of labels in the domain
|
void |
Print(int i)
Prints in the standard output the name of the label number i in the domain
|
void |
PrintDefinition()
Prints in the standard output the definition of the domain
|
void |
PrintDefinition(int i)
Prints in the standard output the label number i in the domain
|
java.lang.String |
PrintDefinitionToString()
Prints in a String the definition of each label in the domain
|
void |
Set(int n,
double inf,
double sup,
boolean menosinf,
boolean masinf)
Creates an uniform domain with n labels from inf to sup, cutting in 0.5
|
void |
Set(int n,
double inf,
double sup,
double[] a,
double[] b,
double[] c,
double[] d,
java.lang.String[] name)
Creates a domain with n labels in [inf,sup].
|
int |
Size()
Returns the number of labels in the domain
|
java.lang.String |
SPrint(int i)
Prints as a String the name of the label number i in the domain
|
double |
Sup_Range()
Retuns the upper value for all the labels in the domain.
|
public domain_t()
Default Constructor
public domain_t(int n, double inf, double sup, boolean menosinf, boolean masinf)
Constructor
n
- int The number of label to be used in 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 otherwisepublic domain_t(domain_t x)
Creates a domain_t object as a copy of "x"
x
- domain_t The object used to created the new onepublic void Set(int n, double inf, double sup, boolean menosinf, boolean masinf)
Creates an uniform domain with n labels from inf to sup, cutting in 0.5
n
- int The number of label to be used in 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 otherwisepublic void Set(int n, double inf, double sup, double[] a, double[] b, double[] c, double[] d, java.lang.String[] name)
Creates a domain with n labels in [inf,sup]. The definition of each label is given by 4 vectors a, b, c and d, where [a[i],b[i],c[i],d[i]] represents the label number i in the domain. The vector name keeps the name of each label.
n
- int The number of label to be used in the variableinf
- double The lower value for the variable rangesup
- double The upper value for the variable rangea
- double[] Parameter a for each of the trapezoidal fuzzy setb
- double[] Parameter b for each of the trapezoidal fuzzy setc
- double[] Parameter c for each of the trapezoidal fuzzy setd
- double[] Parameter d for each of the trapezoidal fuzzy setname
- String[] The name for each of the trapezoidal fuzzy setpublic int N_labels()
Returns the number of labels in the domain
public int Size()
Returns the number of labels in the domain
public double Adaptation(double x)
Returns the adaptation degree of a value x to the domain.
x
- double The valuepublic double Adaptation(double x, int etiqueta)
Returns the adaptation degree of a value x to a specific label in the domain (this label is given by its position in the domain).
x
- double The valueetiqueta
- int The label in the domainpublic double Adaptation(double x, java.lang.String etiquetas)
Returns the adaptation degree of a value x to a set of label in the domain. The labels are given as an ordered vector of zeros and ones. Zero means absence and one represents the presence of the label.
x
- double The valueetiquetas
- String The set of labels in the domainpublic java.lang.String PrintDefinitionToString()
Prints in a String the definition of each label in the domain
public void PrintDefinition()
Prints in the standard output the definition of the domain
public void PrintDefinition(int i)
Prints in the standard output the label number i in the domain
i
- int The label's numberpublic void Print(int i)
Prints in the standard output the name of the label number i in the domain
i
- int The label's numberpublic java.lang.String SPrint(int i)
Prints as a String the name of the label number i in the domain
i
- int The label's numberpublic fuzzy_t FuzzyLabel(int i)
Returns the fuzzy label number i in the domain
i
- int The label's numberpublic double CenterLabel(int i)
Returns the central value of the label number i in the domain
i
- int The label's numberpublic boolean IsDiscrete()
Returns if the domain_t object is formed by labels with all their domain been crisp.
public boolean IsInterval()
Returns if the domain_t object is formed by labels with all their domain been intervals.
public boolean IsFuzzy()
Returns if the domain_t object is formed by labels with all their domain been fuzzy.
public double Area(int l)
Returns the area of the label number l in the domain
l
- int The label's numberpublic domain_t Domain()
Returns an domain_t object with the domain
public double Inf_Range()
Returns the lower value for all the labels in the domain.
public double Sup_Range()
Retuns the upper value for all the labels in the domain.