public interface Attribute
This interface has to be implemented for all attributes representation. By now, there are 3 implementations. Each one is a diferent attribute representation: - Real Representation - Integer Representation - Ternary Representation
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Attribute at)
It checks if two attributes are equal
|
double |
getGenerality()
Returns the generality of the attribute.
|
double |
getLowerAllele()
It returns the lower allele.
|
double |
getUpperAllele()
It returns the upper allele.
|
double |
isDontCareSymbol()
If it's a ternary representation it returns 1 if is # and 0 otherwise.
|
boolean |
isMoreGeneral(Attribute at)
Returns if the current interval is more general than the interval given as a parameter
|
void |
makeSpecify(double env)
It applies the specify operator.
|
boolean |
match(double env)
It checks if the position of the classifier matches with the value in the environment
|
void |
mutate(double envState)
The mutation is done from the environmental state.
|
void |
print()
Prints the classifier representation
|
void |
print(java.io.PrintWriter fout)
Prints the classifier representation on the PrintWriter object given.
|
void |
printNotNorm(java.io.PrintWriter fout,
double lo)
Prints the classifier representation not normalized on the PrintWriter object given.
|
void |
printNotNorm(java.io.PrintWriter fout,
double lo,
double up)
Prints the classifier representation not normalized on the PrintWriter object given.
|
void |
setAllele(Attribute at)
Sets an Allele (attribute) with the attribute given as parameter.
|
void |
setAllele(double lowerValue,
double UpperValue)
In case of being a character attribute, the char value is set as a double in the lowerValue parameter)
|
boolean |
subsumes(Attribute at)
It checks if that attribute of the representation of the classifier can subsume the attribute passed as a
parameter
|
void |
verifyInterval()
Does verify that the interval construction is correct
|
void setAllele(double lowerValue, double UpperValue)
lowerValue
- lower value of the allele.UpperValue
- upper value of the allele.void setAllele(Attribute at)
at
- Attribute given.double getLowerAllele()
double getUpperAllele()
double getGenerality()
void verifyInterval()
void makeSpecify(double env)
env
- environmental value to be set.void mutate(double envState)
envState
- environmental state needed for the mutation operator.boolean match(double env)
env
- environmental value to be checked.boolean equals(Attribute at)
at
- attribute to be checkedboolean subsumes(Attribute at)
at
- attribute to be checkeddouble isDontCareSymbol()
boolean isMoreGeneral(Attribute at)
at
- attribute given to check.void print()
void print(java.io.PrintWriter fout)
fout
- PrintWriter object given to write on.void printNotNorm(java.io.PrintWriter fout, double lo)
fout
- PrintWriter object given to write on.lo
- lower value in the interval.void printNotNorm(java.io.PrintWriter fout, double lo, double up)
fout
- PrintWriter object given to write on.lo
- lower value in the interval.up
- upper value in the interval.