Package jline.bench

Class BenchmarkUtils

  • All Implemented Interfaces:

    
    public class BenchmarkUtils
    
                        

    Utility functions for benchmarking

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      BenchmarkUtils()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static double maxErrorOnSum(Matrix approx, Matrix exact) Calculate maximum error on sum for queue length metrics Returns max absolute error relative to sum of each column Similar to MATLAB: max(abs(exact-approx))/sum(exact)
      static double errOnSum(Matrix approx, Matrix exact) Calculate mean error on sum for queue length metrics Returns mean absolute error relative to sum of each column Similar to MATLAB: mean(abs(exact-approx))/sum(exact)
      static List<Integer> getNonDelayStationIndices(Network model) Get indices of non-delay stations
      static Matrix randGallery(int rows, int cols, int seed) Generate random gallery matrix (similar to MATLAB's randgallery) This creates a random matrix with values in [0,1]
      static double mape(Matrix approx, Matrix exact) Calculate Mean Absolute Percentage Error (MAPE) Wrapper for Utils.
      static double utilizationError(Matrix approx, Matrix exact, Network model) Calculate utilization error for benchmarks Excludes delay stations (row 0) from comparison
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BenchmarkUtils

        BenchmarkUtils()
    • Method Detail

      • maxErrorOnSum

         static double maxErrorOnSum(Matrix approx, Matrix exact)

        Calculate maximum error on sum for queue length metrics Returns max absolute error relative to sum of each column Similar to MATLAB: max(abs(exact-approx))/sum(exact)

      • errOnSum

         static double errOnSum(Matrix approx, Matrix exact)

        Calculate mean error on sum for queue length metrics Returns mean absolute error relative to sum of each column Similar to MATLAB: mean(abs(exact-approx))/sum(exact)

      • randGallery

         static Matrix randGallery(int rows, int cols, int seed)

        Generate random gallery matrix (similar to MATLAB's randgallery) This creates a random matrix with values in [0,1]

      • mape

         static double mape(Matrix approx, Matrix exact)

        Calculate Mean Absolute Percentage Error (MAPE) Wrapper for Utils.mape for benchmark compatibility

      • utilizationError

         static double utilizationError(Matrix approx, Matrix exact, Network model)

        Calculate utilization error for benchmarks Excludes delay stations (row 0) from comparison