Package handevaluator

Examples of handevaluator.Deck


public class BulkTests {
  private static final int TRIALS = 15000000;
  private static final File DAGFILE = new File("carddag");

  public static void runtests(HandEvaluator he, int trials) {
    Deck d = new Deck();
    long ts = System.currentTimeMillis();
    for (int i=0; i < trials; i++) {
      if ((i+1) % 1000000 == 0) {
        System.out.println((System.currentTimeMillis() - ts) + "ms, evaluated " + ((i+1) / 1000000) + " million hands");
      }
      d.randomHand();
      he.calculateEquivalenceClass(d.getBytes());
    }
    System.out.println(he.getClass().getName() + ", " + trials + " trials: " + (System.currentTimeMillis() - ts) + "ms elapsed");
  }
View Full Code Here


    }
    System.out.println(he.getClass().getName() + ", " + trials + " trials: " + (System.currentTimeMillis() - ts) + "ms elapsed");
  }
 
  public static void overhead(int trials) {
    Deck d = new Deck();
    long ts = System.currentTimeMillis();
    for (int i=0; i < trials; i++) {
      if ((i+1) % 1000000 == 0) {
        System.out.println((System.currentTimeMillis() - ts) + "ms, evaluated " + ((i+1) / 1000000) + " million hands");
      }
      d.randomHand();
    }
    System.out.println("Overhead of " + trials + " trials: " + (System.currentTimeMillis() - ts) + "ms elapsed");   
  }
View Full Code Here

TOP

Related Classes of handevaluator.Deck

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.