I have a sequence of motions from images and I need to store all these values. For example:
- a) 1, 2, 3, 4, 3, 2, 1
- b) 1, 2, 3, 2, 3, 4, 5, 4, 3, 2, 1
In order to save space, it would be necessary to have some function that could generate unique numbers to represent each of these sequences. But also, there is another problem: I need representations which could be compared, so, suppose I have
- a) 1, 2, 3, 4, 4, 3, 2, 1
- b) 1, 2, 3, 4, 3, 2, 1
The motion in a) is very similar to b), so I would need some way to represent similarity. There is two patterns for increment/decrement in these sequences, either by 1 or 0, or any other integer value.
I am starting to read about pairing functions and some other similar topics here but I am not sure if I can apply for this (like this topic).