Class MetricResultCalculation
java.lang.Object
edu.university.ecs.lab.detection.metrics.services.MetricResultCalculation
Calculation and aggregation class using metric result values
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds/maps metric values to a given metric namedouble
getAverage
(String metricName) Calculate the average value of a given metricdouble
Find the maximum value of a given metricGet the list of metricsdouble
Find the minimum value of a given metricdouble
Calculate the standard deviation of a given metric
-
Field Details
-
metrics
-
-
Constructor Details
-
MetricResultCalculation
public MetricResultCalculation()
-
-
Method Details
-
addMetric
Adds/maps metric values to a given metric name- Parameters:
metricName
- name of the given metricmetricValue
- value of the given metric
-
getMetrics
Get the list of metrics- Returns:
- hasmap list of metrics
-
getAverage
Calculate the average value of a given metric- Parameters:
metricName
- name of the given metric- Returns:
- average of all values listed under given metric name
-
getMax
Find the maximum value of a given metric- Parameters:
metricName
- name of the given metric- Returns:
- maximum of all values listed under given metric name
-
getMin
Find the minimum value of a given metric- Parameters:
metricName
- name of the given metric- Returns:
- minimum of all values listed under given metric name
-
getStdDev
Calculate the standard deviation of a given metric- Parameters:
metricName
- name of the given metric- Returns:
- standard deviation of all values listed under given metric name
-