Class SearchTimer

java.lang.Object
  extended by SearchTimer

public class SearchTimer
extends java.lang.Object

A class that times the execution of various searching algorithms

Version:
July 2003
Author:
Todd A. Whittaker

Constructor Summary
SearchTimer()
          Builds a SortTimer
 
Method Summary
 long timeSearch(Searcher searcher, int[] arr, int target, int numTimes)
          Times how long it takes to sort the array the given number of times using the provided sorter object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchTimer

public SearchTimer()
Builds a SortTimer

Method Detail

timeSearch

public long timeSearch(Searcher searcher,
                       int[] arr,
                       int target,
                       int numTimes)
Times how long it takes to sort the array the given number of times using the provided sorter object. The input array is not altered (i.e. it remains unsorted).

Parameters:
sorter - what to use for sorting
arr - the array to sort
numTimes - how many times to sort the data
Returns:
the elapsed time for the execution, in milliseconds