feat: build wahrwelt A/D toolkit

This commit is contained in:
TakuyaYagam1 committed 2026-10-14 11:30:41 +03:00
1 parent 303438d206
commit 653924d8c6
564 files changed
+36310 -49998

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
package rendezvous
import "math"
const maxUInt64 = float64(^uint64(0))
func combineKey(nodeID, value string) string {
return nodeID + ":" + value
}
func weightHash(hash uint64, weight int) float64 {
scale := 1.0 / -math.Log(float64(hash)/maxUInt64)
return scale * float64(weight)
}