Okay so here's a good one for you guys, I have some theories but would like some help.
So I have a project I just came up with while I was waking up this morning. Part of this project involves comparing 2D arrays (or Lists, if I say array assume List could replace it).
Now the idea is I have a main 2D array of all int values, and then a collection of 2D arrays that I am comparing to this main 2D array. I want to find the array that is closes to the main array.
I know something like an average would probably not work well here. One idea I had was subracting the 2D array from the collection, from the main 2D array, creating a new 2D array. Each value would then be compared to a threshold value. If the value is under the threshold value it would recieve a 1, if it was over it would recieve a 0 (note that negatives would be converted to positives). This new 2D array of binary bits would be used to determine the array that has the most 1 bits (which would be the closes 2D array).
Another theory I thought of was using Hamming Code, as it's used for comparison, but I really have no clue how to implement this, as I can't remember if I have even doing Hamming Code by hand.
So all you geniuses out there, what to you have to offer here?
(Also note, the 2D might be turning into the point where 1 index could contain multiple values as well, so a 3D array, why I was thinking of the binary bit concept above)