Search and Replace with gen

    Mar 01 2012 | 12:21 pm
    Hello, Gen gurus
    I am trying to find the closest (or perfect) match of specific values within a database. Eg. find the best match for (20 20 20).
    I found a few non-gen solutions, for example a binary searching algorithm. But it takes its time to find a match and I figured a gen version might be faster, especially if I want to find a whole array of matches.
    So my gen approach would be: - Find a Cell in Matrix_2 that matches (or is close to) the values of cell_1 (Matrix_1). ==> copy the Id (stored on plane 3) to Cell_1 of Matrix_1 ==> do the same for all other cells of Matrix_1 (which is what gen does?) --> output.
    I did have a look at the examples and I am able to find matching pairs with gen (step1) but I can't find a solution as how to copy the Id.
    Is that even possible with gen? Am I making sense? I would be glad if someone could give me a hint.
    Thanks a bunch!