Package jline.bench

Class BenchmarkUtils

java.lang.Object
jline.bench.BenchmarkUtils

public class BenchmarkUtils extends Object
Utility functions for benchmarking
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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>
    Get indices of non-delay stations
    static double
    mape(Matrix approx, Matrix exact)
    Calculate Mean Absolute Percentage Error (MAPE) Wrapper for Utils.mape for benchmark compatibility
    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 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
    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 Details

    • BenchmarkUtils

      public BenchmarkUtils()
  • Method Details

    • maxErrorOnSum

      public 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

      public 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)
    • getNonDelayStationIndices

      public static List<Integer> getNonDelayStationIndices(Network model)
      Get indices of non-delay stations
    • randGallery

      public 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

      public static double mape(Matrix approx, Matrix exact)
      Calculate Mean Absolute Percentage Error (MAPE) Wrapper for Utils.mape for benchmark compatibility
    • utilizationError

      public static double utilizationError(Matrix approx, Matrix exact, Network model)
      Calculate utilization error for benchmarks Excludes delay stations (row 0) from comparison