Ejemplo n.º 1
0
 public void addAlgorithm(IScoredScan scan) {
   String key = scan.getAlgorithm();
   if (m_Scores.containsKey(key)) {
     throw new IllegalStateException("duplicate algorithm " + key);
   } else {
     m_Scores.put(key, scan);
   }
 }
Ejemplo n.º 2
0
 /**
  * combine two scores
  *
  * @param added
  */
 public void addTo(IMultiScorer added) {
   IScoredScan[] scoredScans = added.getScoredScans();
   for (int i = 0; i < scoredScans.length; i++) {
     IScoredScan addedScan = scoredScans[i];
     IScoredScan current = getScoredScan(addedScan.getAlgorithm());
     if (current == null) addAlgorithm(addedScan);
     else ((ScoredScan) current).addTo(addedScan);
   }
 }