Class MetricResultCalculation

java.lang.Object
edu.university.ecs.lab.detection.metrics.services.MetricResultCalculation

public class MetricResultCalculation extends Object
Calculation and aggregation class using metric result values
  • Field Details

  • Constructor Details

    • MetricResultCalculation

      public MetricResultCalculation()
  • Method Details

    • addMetric

      public void addMetric(String metricName, Double metricValue)
      Adds/maps metric values to a given metric name
      Parameters:
      metricName - name of the given metric
      metricValue - value of the given metric
    • getMetrics

      public HashMap<String,List<Double>> getMetrics()
      Get the list of metrics
      Returns:
      hasmap list of metrics
    • getAverage

      public double getAverage(String metricName)
      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

      public double getMax(String metricName)
      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

      public double getMin(String metricName)
      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

      public double getStdDev(String metricName)
      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