Documentation of 'edu.princeton.cs.algs4.DoublingTest' Java class
DoublingTest
edu.princeton.cs.algs4

Class DoublingTest



  • public class DoublingTest
    extends java.lang.Object
    The DoublingTest class provides a client for measuring the running time of a method using a doubling test.

    For additional documentation, see Section 1.4 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void main(java.lang.String[] args)
      Prints table of running times to call ThreeSum.count() for arrays of size 250, 500, 1000, 2000, and so forth.
      static double timeTrial(int n)
      Returns the amount of time to call ThreeSum.count() with n random 6-digit integers.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • timeTrial

        public static double timeTrial(int n)
        Returns the amount of time to call ThreeSum.count() with n random 6-digit integers.
        Parameters:
        n - the number of integers
        Returns:
        amount of time (in seconds) to call ThreeSum.count() with n random 6-digit integers
      • main

        public static void main(java.lang.String[] args)
        Prints table of running times to call ThreeSum.count() for arrays of size 250, 500, 1000, 2000, and so forth.
        Parameters:
        args - the command-line arguments

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.