|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.dfki.mycbr.core.similarity.Similarity
public class Similarity
Represents similarity values. Similarity values should be within the range [0.00, 1.00] and are rounded to 2 digits after the decimal point. If the value is not within the given range, the similarity value is represented by the string NaN. The double value of this similarity is usually set to -1.00 and referred to as an invalid similarity.
| Field Summary | |
|---|---|
static Similarity |
INVALID_SIM
|
| Method Summary | |
|---|---|
boolean |
equals(Similarity sim)
Compares this to another similarity. |
static Similarity |
get(java.lang.Double d)
Initializes this with d |
double |
getRoundedValue()
Rounds the value of this similarity to two decimal digits |
double |
getValue()
Get the value of this similarity |
java.lang.String |
toString()
Returns string representation of this similarity. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Similarity INVALID_SIM
| Method Detail |
|---|
public static Similarity get(java.lang.Double d)
d - value of this similaritypublic double getRoundedValue()
public double getValue()
public java.lang.String toString()
Double.toString() else NaN.
toString in class java.lang.Objectpublic boolean equals(Similarity sim)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||