Package gnu.trove.iterator

Examples of gnu.trove.iterator.TDoubleDoubleIterator.key()


  private TDoubleDoubleMap recalc_score_hash(TDoubleDoubleMap scores, double[] column, double least_sufficient) {
    TDoubleDoubleMap new_scores = new TDoubleDoubleHashMap(scores.size());
    TDoubleDoubleIterator iterator = scores.iterator();
    while(iterator.hasNext()) {
      iterator.advance();
      double score = iterator.key();
      double count = iterator.value();
      for (int letter = 0; letter < 4; ++letter) {
        double new_score = score + column[letter];
        if (new_score >= least_sufficient) {
          double add = count * background.count(letter);
 
View Full Code Here


        TDoubleDoubleHashMap second_scores = iterator.value();

        TDoubleDoubleIterator second_iterator = second_scores.iterator();
        while (second_iterator.hasNext()) {
          second_iterator.advance();
          double score_second = second_iterator.key();
          double count = second_iterator.value();

          for (int last_letter = 0; last_letter < 4; ++last_letter) {
            double new_score_first = score_first + firstColumn[4 * first_letter + last_letter];

View Full Code Here

    }
    for(int previousLetter = 0; previousLetter < 4; ++previousLetter) {
      TDoubleDoubleIterator iterator = scores[previousLetter].iterator();
      while(iterator.hasNext()) {
        iterator.advance();
        double score = iterator.key();
        double count = iterator.value();

        for (int letter = 0; letter < 4; ++letter) {
          double new_score = score + column[previousLetter*4 + letter];
          if (new_score >= least_sufficient[letter]) {
View Full Code Here

    TDoubleDoubleMap combined_scores = new TDoubleDoubleHashMap();
    for (int i = 0; i < 4; ++i) {
      TDoubleDoubleIterator iterator = scores[i].iterator();
      while(iterator.hasNext()) {
        iterator.advance();
        double score = iterator.key();
        double count = iterator.value();
        combined_scores.adjustOrPutValue(score, count, count);
      }
    }
    return combined_scores;
View Full Code Here

      TDoubleDoubleHashMap second_scores = iterator.value();

      TDoubleDoubleIterator second_iterator = second_scores.iterator();
      while (second_iterator.hasNext()) {
        second_iterator.advance();
        double score_second = second_iterator.key();
        double count = second_iterator.value();

        for (int letter = 0; letter < PWM.ALPHABET_SIZE; ++letter) {
          double new_score_first = score_first + firstColumn[letter];
View Full Code Here

      TDoubleDoubleHashMap second_scores = iterator.value();

      TDoubleDoubleIterator second_iterator = second_scores.iterator();
      while (second_iterator.hasNext()) {
        second_iterator.advance();
        double score_second = second_iterator.key();
        double count = second_iterator.value();

        for (int letter = 0; letter < PWM.ALPHABET_SIZE; ++letter) {
          double new_score_first = score_first + firstColumn[letter];
View Full Code Here

    if (cache_best_score == null) { // cache
      double max_score = Double.NEGATIVE_INFINITY;
      TDoubleDoubleIterator iterator = score_count_hash.iterator();
      while (iterator.hasNext()) {
        iterator.advance();
        double score = iterator.key();
        max_score = Math.max(score, max_score);
      }
      cache_best_score = max_score;
    }
    return cache_best_score;
View Full Code Here

    double accum = 0.0;
    TDoubleDoubleIterator iterator = score_count_hash.iterator();
    while(iterator.hasNext()) {
      iterator.advance();
      double score = iterator.key();
      double count = iterator.value();
      if (score >= threshold) {
        accum += count;
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.