Package gnu.trove.map.hash

Examples of gnu.trove.map.hash.TIntLongHashMap


*/
public class TByteTripleLongHashMap {
  private TIntLongHashMap map;

  public TByteTripleLongHashMap() {
    map = new TIntLongHashMap(100);
  }
View Full Code Here


  public TByteTripleLongHashMap() {
    map = new TIntLongHashMap(100);
  }

  public TByteTripleLongHashMap(int capacity) {
    map = new TIntLongHashMap(capacity);
  }
View Full Code Here

    System.out.print("Creating histogram of results ... ");
    try {
      BufferedWriter writer = new BufferedWriter(new FileWriter(new File(
          args[0] + ".hist")));
      TIntLongHashMap map = new TIntLongHashMap();
      final int STEP = 5;
      for (int i = 0; i <= 100; i += STEP) {
        map.put(i, 0);
      }
      for (int i = 0; i < list.size() - 1; i++) {
        for (int j = i + 1; j < list.size(); j++) {
          final int val = STEP * (int) ((100 * scores[i][j]) / STEP);
          map.put(val, map.get(val) + 1);

        }
      }
      for (int i = 0; i <= 100; i += STEP) {
        writer.write(i + "," + map.get(i) + "\n");
        System.out.println(i + "," + map.get(i) + "\n");
      }
      System.out.println("Done.");
      writer.close();
    } catch (IOException ex) {

View Full Code Here

TOP

Related Classes of gnu.trove.map.hash.TIntLongHashMap

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.