3 Commits

Author SHA1 Message Date
6bd773cdf0 Refactor Evaluate to simplify error checks and bit counting
Removed redundant length checks and streamlined error handling for XOR operations. Simplified the loop to count differing bits by iterating directly over the XOR result. This improves code readability and reduces duplication.
2025-06-16 15:01:08 +01:00
7480e9232c Refactor Evaluate and add XOR helper function.
Refactored the Evaluate function to utilize a new XOR helper for improved readability and modularity. The XOR function handles the bitwise operation, streamlining the bit difference calculation and supporting potential reuse in related computations.
2025-06-16 14:56:21 +01:00
4f16b0b2fd Fix typo in comment and add Evaluate function for hash comparison
Corrected a typo in a comment within `nilsimsa.go`. Introduced a new `Evaluate` function in `evaluate.go` to compute the bitwise difference between two Nilsimsa hash values, ensuring input validation and proper bit counting logic.
2025-06-16 14:13:17 +01:00