forked from TrueCloudLab/hrw
aa230933d1
HRW library supports weighted sorting. Weights must be normalized before applying. Since there could be different types of normalization for multiple criteria, there is no point to perform simple normalization in this library. Pass a slice of normalized weights to the `SortByWeight` functions. This commit proposes to: - remove normalization routine from `SortByWeight` function; - add `ValidateWeights` function to check if weights are normalized; - rename `weight` -> `distance` to avoid naming confusion between hash distance and actual weights; - use testify lib in the tests;
6 lines
118 B
Modula-2
6 lines
118 B
Modula-2
module github.com/nspcc-dev/hrw
|
|
|
|
require (
|
|
github.com/spaolacci/murmur3 v1.1.0
|
|
github.com/stretchr/testify v1.3.0
|
|
)
|