org.jscience.computing.ai.casebasedreasoning
Class SimilarityDescription
java.lang.Object
org.jscience.computing.ai.casebasedreasoning.SimilarityDescription
- All Implemented Interfaces:
- java.lang.Comparable
public class SimilarityDescription
- extends java.lang.Object
- implements java.lang.Comparable
|
Method Summary |
int |
compareTo(java.lang.Object o)
Implements the compareTo method required by the Comparable interface
We're gonna compare items based on their percent similarity
Used by SimilarItems.rankItems()
The stupid argument name (o) is Sun's fault, not mine
Return codes:
me > arg = -1 (better % match means we go first)
me = arg = 0
me < arg = +1 (it's a better match, it goes first) |
Item |
getItem()
|
float |
getPercentSimilarity()
DOCUMENT ME! |
int |
getRank()
DOCUMENT ME! |
protected void |
setItem(Item newItem)
|
protected void |
setPercentSimilarity(float newPercentMatch)
|
protected void |
setRank(int newRank)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimilarityDescription
public SimilarityDescription()
compareTo
public int compareTo(java.lang.Object o)
- Implements the compareTo method required by the Comparable interface
We're gonna compare items based on their percent similarity
Used by SimilarItems.rankItems()
The stupid argument name (o) is Sun's fault, not mine
Return codes:
me > arg = -1 (better % match means we go first)
me = arg = 0
me < arg = +1 (it's a better match, it goes first)
- Specified by:
compareTo in interface java.lang.Comparable
getItem
public Item getItem()
getRank
public int getRank()
- DOCUMENT ME!
- Returns:
- DOCUMENT ME!
getPercentSimilarity
public float getPercentSimilarity()
- DOCUMENT ME!
- Returns:
- DOCUMENT ME!
setItem
protected void setItem(Item newItem)
setPercentSimilarity
protected void setPercentSimilarity(float newPercentMatch)
setRank
protected void setRank(int newRank)