Class PerformanceTester

java.lang.Object
  extended by PerformanceTester

public class PerformanceTester
extends java.lang.Object

A class that performs complexity experiments using a ListSearcher

Author:
David Chiu

Method Summary
static void testBinarySearch(int n, int numTrials)
          Runs a binary search experiment with the given configurations.
static void testLinearSearch(int n, int numTrials, boolean unordered)
          Runs a linear search experiment with the given configurations.
static void testShuffle(int n, int numTrials)
          Runs a shuffle experiment with the given configurations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

testBinarySearch

public static void testBinarySearch(int n,
                                    int numTrials)
Runs a binary search experiment with the given configurations.

Parameters:
n - The list size
numTrials - The number of runs per new problem size

testLinearSearch

public static void testLinearSearch(int n,
                                    int numTrials,
                                    boolean unordered)
Runs a linear search experiment with the given configurations.

Parameters:
n - The list size
numTrials - The number of runs per new problem size
unordered - Specifies whether an unordered (or ordered) list should be used

testShuffle

public static void testShuffle(int n,
                               int numTrials)
Runs a shuffle experiment with the given configurations.

Parameters:
n - The list size
numTrials - The number of runs per new problem size