Package jline.bench
Class BenchmarkUtils
java.lang.Object
jline.bench.BenchmarkUtils
Utility functions for benchmarking
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleCalculate 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(Network model) Get indices of non-delay stationsstatic doubleCalculate Mean Absolute Percentage Error (MAPE) Wrapper for Utils.mape for benchmark compatibilitystatic doublemaxErrorOnSum(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 MatrixrandGallery(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 doubleutilizationError(Matrix approx, Matrix exact, Network model) Calculate utilization error for benchmarks Excludes delay stations (row 0) from comparison
-
Constructor Details
-
BenchmarkUtils
public BenchmarkUtils()
-
-
Method Details
-
maxErrorOnSum
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
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
Get indices of non-delay stations -
randGallery
Generate random gallery matrix (similar to MATLAB's randgallery) This creates a random matrix with values in [0,1] -
mape
Calculate Mean Absolute Percentage Error (MAPE) Wrapper for Utils.mape for benchmark compatibility -
utilizationError
Calculate utilization error for benchmarks Excludes delay stations (row 0) from comparison
-