mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <>
Subject PriorityQueue in NearestNUserNeighborhood
Date Thu, 06 Nov 2008 22:47:00 GMT

I see this in the NearestNUserNeighborhood:

          ListIterator<UserCorrelationPair> iterator = queue.listIterator(queue.size());
          while (iterator.hasPrevious()) {
            if (theCorrelation <= iterator.previous().theCorrelation) {

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:
which seems to be a slightly modified variation of the Lucene version:

Sematext -- -- Lucene - Solr - Nutch

View raw message