address documentation todo in pivotDescending

This commit is contained in:
Nia Weiss 2020-11-20 11:13:44 -05:00
parent 64b83137a0
commit 5d2c42b7bf
No known key found for this signature in database
GPG key ID: 895E83409BFDA1BB

6
bsi.go
View file

@ -24,9 +24,9 @@ import (
type bsiData []*Row
// pivotDescending loops over nonzero BSI values in descending order.
// For each value, the provided function is called with the value and
// a slice of the associated columns. TODO, document branch and
// limit/offset behavior (particularly when nil).
// For each value, the provided function is called with the value and a slice of the associated columns.
// If limit or offset are not-nil, they will be applied.
// Applying a limit or offset may modify the pointed-to value.
func (bsi bsiData) pivotDescending(filter *Row, branch uint64, limit, offset *uint64, fn func(uint64, ...uint64)) {
// This "pivot" algorithm works by treating the BSI data as a tree.
// Each branch of this tree corresponds to a power-of-2-sized range of BSI values.