I have the feeling that what you want is possible with something like gray codes . if you can translate your values ​​into gray codes and use some kind of checksum that could fix n bits, you could determine if these two arrays were the same except for n-1 error bits, right? (each bit of the error means that the number is "disabled by one", where the display will be such that this is a change in the least significant digit).
but the exact data is superior to me - especially for floating point values.
I don’t know if this helps, but what gray codes are being solved is a problem of pathological rounding. rounding sounds as if this solves the problem - a naive solution can round, and then a checksum. but simple rounding always has pathological cases - for example, if we use gender, then 0.9999999 and 1 are different. the gray-code approach seems to address this since neighboring values ​​are always single-bit, so a bit-based checksum accurately reflects the "distance".
[update:] more precisely, what you want is a checksum that gives an estimate of the hamming distance between your sequences with gray coding (and the gray coded part is simple if you just care about 0.0001 since you can repeatedly by 10000 and use whole numbers).
and it seems that such checksums exist : any error correction code can be used to detect errors. A code with a minimum Hamming distance, d, can detect up to d - 1 errors in a codeword. The use of error correction codes at a minimum distance to detect errors may be appropriate if a strict restriction on the minimum number of errors to be detected is required.
so just in case it’s not clear:
- somewhat by minimal error to get integers
- convert to gray code equivalent
- Use an error detection code with a minimum distance from interference in excess of the allowable error.
but I'm still not sure that it is. you still get pathological rounding in conversion from float to integer. so it seems to you that you need a minimum distance for hamming equal to 1 + len (data) (in the worst case, with a rounding error for each value). is it possible? probably not for large arrays.
it is possible to ask again with the best tags / description now, what is the general direction possible? or just add tags now? we need someone who does this for a living. [I added some tags]
source share