Constructor and Description |
---|
ScoreSet()
Default constructor.
|
ScoreSet(Score[] scores)
The elements of the array are added to the set.
|
ScoreSet(String[] values,
double[] scores)
The elements of the two argument arrays are assumed to be pair-wise associated with each
other.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Produces a deep copy of this object.
|
double |
get(String v)
Returns the double precision score for a particular classification value.
|
Score |
getScore(String v)
Retrieves the
Score object associated with the given classification value. |
String |
highScoreValue()
Retrieves the value with the highest score in this set.
|
void |
put(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
Score s contained in this set. |
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. |
Set |
values()
Retrieves the set of values that have scores associated with them in this score set.
|
public ScoreSet()
public ScoreSet(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.public int size()
public void put(String v, double s)
v
- The classification value.s
- The score.public Set values()
String
s.public double get(String v)
v
- The classification value.public Score getScore(String v)
Score
object associated with the given classification value.v
- The classification value.Score
object.public String highScoreValue()
public Score[] toArray()
Score
s contained in this set.Score
s.public 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.Copyright © 2016. All rights reserved.