[#199] sdk/netmap: Correct linter's remarks

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-16 17:52:15 +03:00 committed by Alex Vanin
parent 459d295788
commit 3a966ee5df
9 changed files with 69 additions and 37 deletions

View file

@ -70,10 +70,12 @@ func (c *Context) setPivot(pivot []byte) {
func GetDefaultWeightFunc(ns Nodes) weightFunc {
mean := newMeanAgg()
min := newMinAgg()
for i := range ns {
mean.Add(float64(ns[i].Capacity))
min.Add(float64(ns[i].Price))
}
return newWeightFunc(
newSigmoidNorm(mean.Compute()),
newReverseMinNorm(min.Compute()))