mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-12 07:41:02 +00:00
modifed depth for category based topn
This commit is contained in:
parent
216e7695a7
commit
345689bbe9
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue