Documentation
¶
Index ¶
- func BallsInBinsMaxLoad(balls, bins float64) float64
- func F(x, c float64) float64
- func FDerivative(x, c float64) float64
- func HashUtilMurmurHash64(h uint64) uint64
- func HashUtilMurmurHash64Raw(data []byte) uint64
- func ProperAltRange(M, i int, len []int) int
- func RoundDown(a, b uint64) uint64
- func RoundUp(a, b int) int
- func SolveEquation(c float64) float64
- func UpperPower2(x int) int
- type SemiSortCuckooFilter
- func (v *SemiSortCuckooFilter) Alternate(pos int64, fp int64) int64
- func (f *SemiSortCuckooFilter) Clear()
- func (f *SemiSortCuckooFilter) Delete(data []byte) bool
- func (f *SemiSortCuckooFilter) DeleteInBucket(pos int64, fp int64) int
- func (f *SemiSortCuckooFilter) Fingerprint(ele uint64) uint64
- func (f *SemiSortCuckooFilter) GetBucket(pos int64, store []int64)
- func (f *SemiSortCuckooFilter) GetLoadFactor() float64
- func (f *SemiSortCuckooFilter) Init(maxItem, m, step int)
- func (v *SemiSortCuckooFilter) Insert(data []byte) bool
- func (f *SemiSortCuckooFilter) InsertToBucket(store []int64, fp int64) int
- func (f *SemiSortCuckooFilter) Lookup(raw []byte) bool
- func (f *SemiSortCuckooFilter) LookupInBucket(pos int64, fp int64) int
- func (f *SemiSortCuckooFilter) PositionHash(ele int64) int64
- func (f *SemiSortCuckooFilter) SetBucket(pos int64, store []int64)
- func (f *SemiSortCuckooFilter) SortPair(a, b *int64)
- type VacuumFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BallsInBinsMaxLoad ¶
BallsInBinsMaxLoad calculates the maximum load based on the balls-in-bins model.
func FDerivative ¶
FDerivative is the derivative of F with respect to x.
func HashUtilMurmurHash64 ¶
HashUtilMurmurHash64 is a placeholder for the MurmurHash function
func HashUtilMurmurHash64Raw ¶
func ProperAltRange ¶
func SolveEquation ¶
SolveEquation solves the given equation using Newton's method.
func UpperPower2 ¶
Types ¶
type SemiSortCuckooFilter ¶
type SemiSortCuckooFilter struct {
// contains filtered or unexported fields
}
func (*SemiSortCuckooFilter) Alternate ¶
func (v *SemiSortCuckooFilter) Alternate(pos int64, fp int64) int64
func (*SemiSortCuckooFilter) Delete ¶
func (f *SemiSortCuckooFilter) Delete(data []byte) bool
func (*SemiSortCuckooFilter) DeleteInBucket ¶
func (f *SemiSortCuckooFilter) DeleteInBucket(pos int64, fp int64) int
func (*SemiSortCuckooFilter) Fingerprint ¶
func (f *SemiSortCuckooFilter) Fingerprint(ele uint64) uint64
Fingerprint generates a fingerprint for an element
func (*SemiSortCuckooFilter) GetBucket ¶
func (f *SemiSortCuckooFilter) GetBucket(pos int64, store []int64)
func (*SemiSortCuckooFilter) GetLoadFactor ¶
func (f *SemiSortCuckooFilter) GetLoadFactor() float64
GetLoadFactor computes the load factor
func (*SemiSortCuckooFilter) Init ¶
func (f *SemiSortCuckooFilter) Init(maxItem, m, step int)
Init initializes the SemiSortCuckooFilter
func (*SemiSortCuckooFilter) Insert ¶
func (v *SemiSortCuckooFilter) Insert(data []byte) bool
Insert overrides Insert for VacuumFilter
func (*SemiSortCuckooFilter) InsertToBucket ¶
func (f *SemiSortCuckooFilter) InsertToBucket(store []int64, fp int64) int
func (*SemiSortCuckooFilter) Lookup ¶
func (f *SemiSortCuckooFilter) Lookup(raw []byte) bool
func (*SemiSortCuckooFilter) LookupInBucket ¶
func (f *SemiSortCuckooFilter) LookupInBucket(pos int64, fp int64) int
func (*SemiSortCuckooFilter) PositionHash ¶
func (f *SemiSortCuckooFilter) PositionHash(ele int64) int64
PositionHash maps an element to a position in the filter
func (*SemiSortCuckooFilter) SetBucket ¶
func (f *SemiSortCuckooFilter) SetBucket(pos int64, store []int64)
func (*SemiSortCuckooFilter) SortPair ¶
func (f *SemiSortCuckooFilter) SortPair(a, b *int64)
Helper function to sort two values in descending order
type VacuumFilter ¶
type VacuumFilter struct {
SemiSortCuckooFilter
}
VacuumFilter is a type of SemiSortCuckooFilter
Click to show internal directories.
Click to hide internal directories.