public static void writeHistogram(TDoubleDoubleHashMap distr,String filename) throws FileNotFoundException, IOException {
  BufferedWriter aWriter=IOUtils.getBufferedWriter(filename);
  aWriter.write("bin\tcount");
  aWriter.newLine();
  double[] keys=distr.keys();
  Arrays.sort(keys);
  for (  double key : keys) {
    aWriter.write(String.valueOf(key));
    aWriter.write("\t");
    aWriter.write(String.valueOf(distr.get(key)));
    aWriter.newLine();
  }
  aWriter.close();
}

public static void writeHistogram ( TDoubleDoubleHashMap distr , String filename ) throws FileNotFoundException , IOException { BufferedWriter aWriter = IOUtils . getBufferedWriter ( filename ) ; aWriter . write ( "bin\tcount" ) ; aWriter . newLine ( ) ; double [ ] keys = distr . keys ( ) ; Arrays . sort ( keys ) ; for ( double key : keys ) { aWriter . write ( String . valueOf ( key ) ) ; aWriter . write ( "\t" ) ; aWriter . write ( String . valueOf ( distr . get ( key ) ) ) ; aWriter . newLine ( ) ; } aWriter . close ( ) ; }
writes a histogram as a tab - separated file with two columns : the first column indicates the bin key ( e . g . upper bin border ) , the second column displays the count / share values .
