So let's say you had a textfile like
-
name;description;number1;number2;number3;number4;.... ;numberN
-
name2;description2;...
- ...
and a function that gives you an arraylist containing of number1, number2, ..., numberN
How would you determine
nameN which resembles the functions's output?
Normally I don't do this, as it spoils the ideas I get but I want to share my approach with you hoping to find something better, as it is not reliable. My approach is
-
Get the function's values
-
Compare each value within a tolerance with each relating value(compare numberN_function with numberN_line_1 +- 100) (compare numberN_function with numberN_line_2 +- 100) etc.
-
Output nameN when above gives true in more than 50 per cent, ie say N = 100 and 51 values are within boundaries, the software outputs true.
The problem with my approach is that as soon as a similar group of numbers was found within the threshold, the software waits for the next call of
function. So a lot of times I simply get the first row even though another row is closer. If I lower tolerance(ie less than 100), I often get no result.
Best
1