Let's say that I have elements (X, Y and Z) in the list, I have a function that generates a percentage of which two objects are similar to each other.
What I want to do is run X against Y and Z using my Elements comparisons, therefore:
compareElements(X,Y);
compareElements(X,Z);
Then Y versus X and Z
compareElements(Y,X);
compareElements(Y,Z);
Then Z vs Y and X
compareElements(Z,X);
compareElements(Z,Y);
Then I return the highest value equal to 62.
Obviously there is a repetition there, I do not need a repetition, but I am not sure how to eliminate it.
How can I structure my LINQ query or function / algorithm for this comparison for each element without repeating?
LINQ, , , , , , .
, - , , 62.
. . 3 10 , .