I have two colored lines, which can be thought of as functions I1,I2:[0,1]->R. I want to check whether I1 and I2 'topologically' represent the same object. In other words, if I stretch some parts of I1 and squeeze some other parts, I want to get I2.
Obviously they have to have the same colors and 'in the same order'.
Is there a metric that measures this kind of similarity?