Hi,
I see this in the NearestNUserNeighborhood:
ListIterator<UserCorrelationPair> iterator =
queue.listIterator(queue.size());
while (iterator.hasPrevious()) {
if (theCorrelation <= iterator.previous().theCorrelation) {
iterator.next();
break;
}
}
This looks like a priority queue.... if so, I wonder if it would be clearer to
just use the java.util.PriorityQueue or maybe even a variation of the one in
Lucene? Not sure if there's a need for this change, just thinking our loud as
I browse Taste code.
Oh, I see Hadoop has its own PQ, too:
http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/util/PriorityQueue.html
which seems to be a slightly modified variation of the Lucene version:
http://hudson.zones.apache.org/hudson/job/Lucene-trunk/javadoc/org/apache/lucene/util/PriorityQueue.html
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch