code: private static Map<Integer, Double> initializeScores(Map<Integer, Integer> alignment,
  			Map<Integer, Double> scores, int k) {
  		if(scores == null) {
  			scores = new HashMap<Integer, Double>(alignment.size());
  		} else {
  			scores.clear();
  		}
  		Map<Integer,Integer> alignK = AlignmentTools.applyAlignment(alignment, k);
  
  		// calculate input range
  		int maxPre = Integer.MIN_VALUE;
  		int minPre = Integer.MAX_VALUE;
  		for(Integer pre : alignment.keySet()) {
  			if(pre>maxPre) maxPre = pre;
  			if(pre<minPre) minPre = pre;
  		}
  
  		for(Integer pre : alignment.keySet()) {
  			Integer image = alignK.get(pre);
  
  			// Use the absolute error score, |x - f^k(x)|
  			double score = scoreAbsError(pre,image,minPre,maxPre);
  			scores.put(pre, score);
  		}
  		return scores;
  	}
docs: Calculates all scores for an alignment
  @param alignment
  @param scores A mapping from residues to scores, which will be updated or
  created if null
  @return scores