- 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 Nov 03 19:28:11 UTC 2024 - 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 7.4K bytes - Viewed (0)