|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.classify.ScoreSet
public class ScoreSet
A score set is simply a set of Scores.
Score| Field Summary | |
|---|---|
private java.util.HashMap |
set
The scores in this set, indexed by the discrete classification. |
| Constructor Summary | |
|---|---|
ScoreSet()
Default constructor. |
|
ScoreSet(Score[] scores)
The elements of the array are added to the set. |
|
ScoreSet(java.lang.String[] values,
double[] scores)
The elements of the two argument arrays are assumed to be pair-wise associated with each other. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Produces a deep copy of this object. |
double |
get(java.lang.String v)
Returns the double precision score for a particular classification value. |
Score |
getScore(java.lang.String v)
Retrieves the Score object associated with the given
classification value. |
java.lang.String |
highScoreValue()
Retrieves the value with the highest score in this set. |
void |
put(java.lang.String v,
double s)
Sets the score for a particular classification value. |
int |
size()
Returns the number of scores in this set. |
Score[] |
toArray()
Returns an array view of the Scores contained in this set. |
java.lang.String |
toString()
The string representation of a ScoreSet is the
concatenation of the string representations of each Score
in the set sorted by value, separated by commas, and surrounded by curly
braces. |
java.util.Set |
values()
Retrieves the set of values that have scores associated with them in this score set. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.util.HashMap set
| Constructor Detail |
|---|
public ScoreSet()
public ScoreSet(java.lang.String[] values,
double[] scores)
values - The classification values being scored.scores - The scores of the classification values.public ScoreSet(Score[] scores)
scores - The scores to add to the set.| Method Detail |
|---|
public int size()
public void put(java.lang.String v,
double s)
v - The classification value.s - The score.public java.util.Set values()
Strings.public double get(java.lang.String v)
v - The classification value.
public Score getScore(java.lang.String v)
Score object associated with the given
classification value.
v - The classification value.
Score object.public java.lang.String highScoreValue()
public Score[] toArray()
Scores contained in this set.
Scores.public java.lang.String toString()
ScoreSet is the
concatenation of the string representations of each Score
in the set sorted by value, separated by commas, and surrounded by curly
braces.
toString in class java.lang.ObjectScoreSet.public java.lang.Object clone()
clone in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||