Class SpeedComparison


  • public class SpeedComparison
    extends Object
    This class implements the runtime comparison of complete coherence calculations as well as single parts of a coherence.
    Author:
    Michael Röder (michael.roeder@uni-paderborn.de)
    • Field Detail

      • random

        private Random random
      • numberOfWarmups

        private final int numberOfWarmups
      • numberOfRuns

        private final int numberOfRuns
    • Constructor Detail

      • SpeedComparison

        public SpeedComparison​(long seed,
                               int numberOfWarmups,
                               int numberOfRuns)
    • Method Detail

      • executeCoherenceCalculations

        protected void executeCoherenceCalculations​(Coherence[] coherences,
                                                    String[][] wordSets,
                                                    Map<String,​long[]> times,
                                                    int runId)
      • executeCoherenceCalculation

        protected long executeCoherenceCalculation​(Coherence coherence,
                                                   String[][] wordSets)
      • getRandomOrder

        protected int[] getRandomOrder​(int n)
      • printStatistics

        protected static void printStatistics​(String label,
                                              long[] values)
      • main

        public static void main​(String[] args)
                         throws org.apache.lucene.index.CorruptIndexException,
                                IOException
        Throws:
        org.apache.lucene.index.CorruptIndexException
        IOException