Package com.browseengine.bobo.util

Examples of com.browseengine.bobo.util.IntBoundedPriorityQueue


            }

          }, count);
          facetColl=new LinkedList<BrowseFacet>();
          final int forbidden = -1;
          IntBoundedPriorityQueue pq=new IntBoundedPriorityQueue(comparator,max, forbidden);

          for (int i=1;i<countlength;++i)
          {
            int hits=count.get(i);
            if (hits>=minCount)
            {
              pq.offer(i);
            }
          }

          int val;
          while((val = pq.pollInt()) != forbidden)
          {
            BrowseFacet facet=new BrowseFacet(valList.get(val),count.get(val));
            ((LinkedList<BrowseFacet>)facetColl).addFirst(facet);
          }
        }
View Full Code Here


            }

          }, _count);
          facetColl=new LinkedList<BrowseFacet>();
          final int forbidden = -1;
          IntBoundedPriorityQueue pq=new IntBoundedPriorityQueue(comparator,max, forbidden);

          for (int i=1;i<_countlength;++i) // exclude zero
          {
            int hits=_count.get(i);
            if (hits>=minCount)
            {
              if(!pq.offer(i))
              {
                // pq is full. we can safely ignore any facet with <=hits.
                minCount = hits + 1;
              }
            }
          }

          int val;
          while((val = pq.pollInt()) != forbidden)
          {
            BrowseFacet facet=new BrowseFacet(getFacetString(val),_count.get(val));
            ((LinkedList<BrowseFacet>)facetColl).addFirst(facet);
          }
        }
View Full Code Here

                return _predefinedRanges.getRawValue(index);
              }
            }, rangeCount);
         
          final int forbidden = -1;
          IntBoundedPriorityQueue pq=new IntBoundedPriorityQueue(comparator, maxNumOfFacets, forbidden);
          for (int i=0; i<_predefinedRangeIndexes.length; ++i)
          {
            if (rangeCount.get(i)>=minCount)   pq.offer(i);
          }

          int val;
          facetColl=new LinkedList<BrowseFacet>();
          while((val = pq.pollInt()) != forbidden)
          {
            BrowseFacet facet=new BrowseFacet(_predefinedRanges.get(val),rangeCount.get(val));
            ((LinkedList<BrowseFacet>)facetColl).addFirst(facet);
          }
        }
View Full Code Here

            }

          }, count);
          facetColl=new LinkedList<BrowseFacet>();
          final int forbidden = -1;
          IntBoundedPriorityQueue pq=new IntBoundedPriorityQueue(comparator,max, forbidden);

          for (int i=1;i<countlength;++i)
          {
            int hits=count[i];
            if (hits>=minCount)
            {
              pq.offer(i);
            }
          }

          int val;
          while((val = pq.pollInt()) != forbidden)
          {
            BrowseFacet facet=new BrowseFacet(valList.get(val),count[val]);
            ((LinkedList<BrowseFacet>)facetColl).addFirst(facet);
          }
        }
View Full Code Here

                return _predefinedRanges.getRawValue(index);
              }
            }, rangeCount);
         
          final int forbidden = -1;
          IntBoundedPriorityQueue pq=new IntBoundedPriorityQueue(comparator, maxNumOfFacets, forbidden);
          for (int i=0; i<_predefinedRangeIndexes.length; ++i)
          {
            if (rangeCount[i]>=minCount)   pq.offer(i);
          }

          int val;
          facetColl=new LinkedList<BrowseFacet>();
          while((val = pq.pollInt()) != forbidden)
          {
            BrowseFacet facet=new BrowseFacet(_predefinedRanges.get(val),rangeCount[val]);
            ((LinkedList<BrowseFacet>)facetColl).addFirst(facet);
          }
        }
View Full Code Here

            }

          }, _count);
          facetColl=new LinkedList<BrowseFacet>();
          final int forbidden = -1;
          IntBoundedPriorityQueue pq=new IntBoundedPriorityQueue(comparator,max, forbidden);

          for (int i=1;i<_countlength;++i) // exclude zero
          {
            int hits=_count[i];
            if (hits>=minCount)
            {
              if(!pq.offer(i))
              {
                // pq is full. we can safely ignore any facet with <=hits.
                minCount = hits + 1;
              }
            }
          }

          int val;
          while((val = pq.pollInt()) != forbidden)
          {
            BrowseFacet facet=new BrowseFacet(getFacetString(val),_count[val]);
            ((LinkedList<BrowseFacet>)facetColl).addFirst(facet);
          }
        }
View Full Code Here

            }

          }, _count);
          facetColl = new LinkedList<BrowseFacet>();
          final int forbidden = -1;
          IntBoundedPriorityQueue pq = new IntBoundedPriorityQueue(comparator, max, forbidden);

          for (int i = 1; i < _countlength; ++i) // exclude zero
          {
            int hits = _count.get(i);
            if (hits >= minCount) {
              if (!pq.offer(i)) {
                // pq is full. we can safely ignore any facet with <=hits.
                minCount = hits + 1;
              }
            }
          }

          int val;
          while ((val = pq.pollInt()) != forbidden) {
            BrowseFacet facet = new BrowseFacet(getFacetString(val), _count.get(val));
            ((LinkedList<BrowseFacet>) facetColl).addFirst(facet);
          }
        }
        return facetColl;
View Full Code Here

            }

          }, _count);
          facetColl=new LinkedList<BrowseFacet>();
          final int forbidden = -1;
          IntBoundedPriorityQueue pq=new IntBoundedPriorityQueue(comparator,max, forbidden);

          for (int i=1;i<_countlength;++i) // exclude zero
          {
            int hits=_count[i];
            if (hits>=minCount)
            {
              if(!pq.offer(i))
              {
                // pq is full. we can safely ignore any facet with <=hits.
                minCount = hits + 1;
              }
            }
          }

          int val;
          while((val = pq.pollInt()) != forbidden)
          {
            BrowseFacet facet=new BrowseFacet(getFacetString(val),_count[val]);
            ((LinkedList<BrowseFacet>)facetColl).addFirst(facet);
          }
        }
View Full Code Here

                return _predefinedRanges.getRawValue(index);
              }
            }, rangeCount);
         
          final int forbidden = -1;
          IntBoundedPriorityQueue pq=new IntBoundedPriorityQueue(comparator, maxNumOfFacets, forbidden);
          for (int i=0; i<_predefinedRangeIndexes.length; ++i)
          {
            if (rangeCount[i]>=minCount)   pq.offer(i);
          }

          int val;
          facetColl=new LinkedList<BrowseFacet>();
          while((val = pq.pollInt()) != forbidden)
          {
            BrowseFacet facet=new BrowseFacet(_predefinedRanges.get(val),rangeCount[val]);
            ((LinkedList<BrowseFacet>)facetColl).addFirst(facet);
          }
        }
View Full Code Here

            }

          }, count);
          facetColl=new LinkedList<BrowseFacet>();
          final int forbidden = -1;
          IntBoundedPriorityQueue pq=new IntBoundedPriorityQueue(comparator,max, forbidden);

          for (int i=1;i<countlength;++i)
          {
            int hits=count[i];
            if (hits>=minCount)
            {
              pq.offer(i);
            }
          }

          int val;
          while((val = pq.pollInt()) != forbidden)
          {
            BrowseFacet facet=new BrowseFacet(valList.get(val),count[val]);
            ((LinkedList<BrowseFacet>)facetColl).addFirst(facet);
          }
        }
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.util.IntBoundedPriorityQueue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.