- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for hashOrder (0.04 sec)
-
docs/debugging/hash-set/main.go
return int(sum64 % uint64(cardinality)) } // hashOrder - hashes input key to return consistent // hashed integer slice. Returned integer order is salted // with an input key. This results in consistent order. // NOTE: collisions are fine, we are not looking for uniqueness // in the slices returned. func hashOrder(key string, cardinality int) []int { if cardinality <= 0 {
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 3.7K bytes - Viewed (0) -
cmd/erasure-metadata-utils_test.go
for i, testCase := range testCases { hashedOrder := hashOrder(testCase.objectName, 16) if !reflect.DeepEqual(testCase.hashedOrder, hashedOrder) { t.Errorf("Test case %d: Expected \"%v\" but failed \"%v\"", i+1, testCase.hashedOrder, hashedOrder) } } // Tests hashing order to fail for when order is '-1'. if hashedOrder := hashOrder("This will fail", -1); hashedOrder != nil {
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 7.3K bytes - Viewed (0)