Esempio n. 1
0
 public void onTraversalDone(Integer includedSites) {
   logger.info("Sites included in beagle likelihoods file             : " + includedSites);
   logger.info(
       String.format(
           "Certain false positive found from recalibration curve : %d (%.2f%%)",
           certainFPs, (100.0 * certainFPs) / (Math.max(certainFPs + includedSites, 1))));
 }
Esempio n. 2
0
    /**
     * Creates a new LRU cache.
     *
     * @param cacheSize the maximum number of entries that will be kept in this cache.
     */
    public LRUCache(int cacheSize) {
      this.cacheSize = cacheSize;
      int hashTableCapacity = (int) Math.ceil(cacheSize / hashTableLoadFactor) + 1;
      map =
          new LinkedHashMap<K, V>(hashTableCapacity, hashTableLoadFactor, true) {
            // (an anonymous inner class)
            private static final long serialVersionUID = 1;

            @Override
            protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
              return size() > LRUCache.this.cacheSize;
            }
          };
    }