Package jline.bench
Class BenchmarkUtils
-
- All Implemented Interfaces:
public class BenchmarkUtilsUtility functions for benchmarking
-
-
Constructor Summary
Constructors Constructor Description BenchmarkUtils()
-
Method Summary
Modifier and Type Method Description static 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 doubleerrOnSum(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 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 doublemape(Matrix approx, Matrix exact)Calculate Mean Absolute Percentage Error (MAPE) Wrapper for Utils. static doubleutilizationError(Matrix approx, Matrix exact, Network model)Calculate utilization error for benchmarks Excludes delay stations (row 0) from comparison -
-
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)
-
getNonDelayStationIndices
static List<Integer> getNonDelayStationIndices(Network model)
Get indices of non-delay stations
-
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
-
-
-
-