Skip to content

Commit

Permalink
More comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Aug 8, 2014
1 parent 36e3a87 commit c82a6ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions fastaggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func (p rblist) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
func (p rblist) Len() int { return len(p) }
func (p rblist) Less(i, j int) bool { return p[i].getSizeInBytes() > p[j].getSizeInBytes() }

// FastAnd computes the intersection between many bitmaps quickly
func FastAnd(bitmaps ...*RoaringBitmap) *RoaringBitmap {
if len(bitmaps) == 0 {
return NewRoaringBitmap()
Expand All @@ -27,6 +28,7 @@ func FastAnd(bitmaps ...*RoaringBitmap) *RoaringBitmap {
}
return answer
}
// FastOr computes the union between many bitmaps quickly
func FastOr(bitmaps ...*RoaringBitmap) *RoaringBitmap {
if len(bitmaps) == 0 {
return NewRoaringBitmap()
Expand All @@ -46,6 +48,7 @@ func FastOr(bitmaps ...*RoaringBitmap) *RoaringBitmap {
return heap.Pop(&pq).(*Item).value
}

// FastXor computes the intersection between many bitmaps quickly
func FastXor(bitmaps ...*RoaringBitmap) *RoaringBitmap {
if len(bitmaps) == 0 {
return NewRoaringBitmap()
Expand Down
2 changes: 1 addition & 1 deletion roaring.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strconv"
)

// Roaring represents a compressed bitmap where you can add integers.
// RoaringBitmap represents a compressed bitmap where you can add integers.
type RoaringBitmap struct {
highlowcontainer roaringArray
}
Expand Down

0 comments on commit c82a6ff

Please sign in to comment.