docs: private void processDestination(FastQueue<AssociatedIndex> matches, int numDestination,
  									FastQueue<AssociatedIndex> output ) {
  		//set up data structures
  		scores.resize(numDestination);
  		solutions.resize(numDestination);
  		for( int i =0; i < numDestination; i++ ) {
  			solutions.data[i] = -1;
  		}
  
  		// select best matches
  		for( int i = 0; i < matches.size(); i++ ) {
  			AssociatedIndex a = matches.get(i);
  			int found = solutions.data[a.dst];
  			if( found != -1 ) {
  				if( found == -2 ) {
  					// the best solution is invalid because two or more had the same score, see if this is better
  					double bestScore = scores.data[a.dst];
  					int result = type.compareTo(bestScore,a.fitScore);
  					if( result < 0 ) {
  						// found a better one, use this now
  						solutions.data[a.dst] = i;
  						scores.data[a.dst] = a.fitScore;
  					}
  				} else {
  					// see if this new score is better than the current best
  					AssociatedIndex currentBest = matches.get( found );
  					int result = type.compareTo(currentBest.fitScore,a.fitScore);
  					if( result < 0 ) {
  						// found a better one, use this now
  						solutions.data[a.dst] = i;
  						scores.data[a.dst] = a.fitScore;
  					} else if( result == 0 ) {
  						// two solutions have the same score
  						solutions.data[a.dst] = -2;
  					}
  				}
  			} else {
  				// no previous match found
  				solutions.data[a.dst] = i;
  				scores.data[a.dst] = i;
  			}
  		}
  
  		output.reset();
  		for( int i =0; i < numDestination; i++ ) {
  			int index = solutions.data[i];
  			if( index >= 0 ) {
  				output.add( matches.get(index) );
  			}
  		}
  	}