modifed depth for category based topn

This commit is contained in:
Todd Gruben 2014-07-31 16:22:38 +00:00
parent 216e7695a7
commit 345689bbe9

View file

@ -260,16 +260,18 @@ func (self *Brand) TopNCat(src_bitmap IBitmap, n int, category *IntSet) []Pair {
results = append(results, o)
for i := x + 1; i < len(self.rankings); i++ {
counter = counter + 1
o = self.rankings[i]
if needCat {
if !category.Contains(o.category) {
continue
}
counter = counter + 1
} else {
counter = counter + 1
}
if i > breakout {
if counter > breakout {
break
}