Class StatisticsToExport
Object
org.anchoranalysis.annotation.io.comparer.StatisticsToExport
public class StatisticsToExport extends Object
Statistics to be exported, comprised of name-value pairs.
The values may be of type int, double or String.
Typically, they are later written to a CSV file.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description StatisticsToExport() -
Method Summary
Modifier and Type Method Description voidaddDouble(String name, double value)Adds a statistic that is adouble.voidaddInt(String name, int value)Adds a statistic that is anint.voidaddMeanExtrema(String name, double mean, double min, double max)Adds three statistics a mean, min and max.voidaddMeanExtrema(String name, org.anchoranalysis.math.arithmetic.RunningSumExtrema runningSum)LikeaddMeanExtrema(String, double, double, double)but determines the statistics from aRunningSumExtrema.voidaddString(String name, String value)Adds a statistic that is aString.voidappend(StatisticsToExport toAppend)Appends the names and values from anotherAnnotationComparisonto the existing.List<String>getNames()The names of statistics describing the annotation-comparison, as produced bygetValues().List<org.anchoranalysis.core.value.TypedValue>getValues()The values of statistics describing the annotation-comparison, corresponding exactly to the names ingetNames().
-
Constructor Details
-
StatisticsToExport
public StatisticsToExport()
-
-
Method Details
-
append
Appends the names and values from anotherAnnotationComparisonto the existing.Items are added to the end of their respective lists.
This is a mutable operation.
- Parameters:
toAppend- the comparison to append.
-
addString
Adds a statistic that is aString.- Parameters:
name- the name of the statistic.value- the value of the statistic.
-
addDouble
Adds a statistic that is adouble.- Parameters:
name- the name of the statistic.value- the value of the statistic.
-
addInt
Adds a statistic that is anint.- Parameters:
name- the name of the statistic.value- the value of the statistic.
-
addMeanExtrema
Adds three statistics a mean, min and max.- Parameters:
name- the name of the statistic, which is capitalized and prefixed withmean,minandmaxrespectively.mean- the mean.min- the min.max- the max.
-
addMeanExtrema
public void addMeanExtrema(String name, org.anchoranalysis.math.arithmetic.RunningSumExtrema runningSum)LikeaddMeanExtrema(String, double, double, double)but determines the statistics from aRunningSumExtrema.- Parameters:
name- the name of the statistic, which is capitalized and prefixed withmean,minandmaxrespectively.runningSum- the running-sum, also remembering extrema.
-
getNames
The names of statistics describing the annotation-comparison, as produced bygetValues(). -
getValues
The values of statistics describing the annotation-comparison, corresponding exactly to the names ingetNames().
-