Skip to content

Releases: nspcc-dev/hrw

v2.0.4

09 Sep 15:45
09bca63

Choose a tag to compare

  • Updated minimal required Go to version 1.24 (#30, #32)
  • Updated golang.org/x/exp dependency to v0.0.0-20250819193227-8b4c13bb791b (#32)

v2.0.3

21 Aug 19:15
b356a88

Choose a tag to compare

  • Upgrade to minimal Go 1.22 (#27)

v2.0.2

09 Aug 11:37
2c17f72

Choose a tag to compare

  • minimal supported Go is 1.21 now (#25)
  • upgrade github.com/stretchr/testify dependency to v1.9.0 (#25)
  • upgrade golang.org/x/exp dependency to v0.0.0-20240808152545-0cdaa3abc0fa (#25)

v2.0.1

26 Feb 07:08
718e00a

Choose a tag to compare

  • minimal required Go version is 1.20 now (#23)
  • updated golang.org/x/exp dependency to v0.0.0-20240213143201-ec583247a57a

v2.0.0

28 Nov 13:46
43aa643

Choose a tag to compare

This is a reworked version of the library using completely new generic-based interface. Other significant changes:

  • requires Go 1.19+ (#18)
  • murmur dependency is replaced to github.com/twmb/murmur3, it's faster in most of the cases (#18)
  • reflection is no longer used which improves performance from 10 to 88%% depending on scenario (#19)

Add NaN check in weight verification

01 Aug 09:17
f52ea8f

Choose a tag to compare

Handle NaN values in weight validation function (#7)

NaN values can pass the validation since NaN values don't work
with float arithmetic and comparisons are always true. Now validation
function has check for NaN values.

Weighted sorting with normalized weights

05 Jul 06:54
aa23093

Choose a tag to compare

This release contains changes in weighted HRW sorting. Now weighted sorting functions take a slice of normalized weights []float64 as an input. This way, you can use any normalization (e.g. multicriteria normalization) and pass prepared weights to the functions.

Support of weighted sorting

27 May 07:53
58a8ce4

Choose a tag to compare

This release contains new functions to support weighted hrw sorting. You can specify weights of the nodes and perform SortSliceByValue() operation for uniform sorting and SortSliceByWeightValue() for weighted sorting.

✌️ Fixed in SortSliceByValue issue when weight calculated twice

24 May 09:52
d32f396

Choose a tag to compare

  • fixes for SortSliceByValue
  • fixes for tests

🐌 hot fix types

12 Apr 11:19
9a6fcdb

Choose a tag to compare

v1.0.5

🐌 hot fix types