I want to find double sequences (of 10-bit data, not necessary here) which length is more than 2. The double sequence of certain elements can be numbered by two indices, here. Example data is
data = [ 4.123456 4.123456 4.123456 4.123456 7.123456 1.123456 1.123456 1.123456 ]
which expected output is
{[4.123456 4.123456 4.123456 4.123456], [1.123456 1.123456 1.123456]}
Hankel approach
I am interested in transformations like hankel as used well in the answer here about Finding a sequence of 4 values in an array without loop and described here by J. Layman well. Hankel provides a transformation of a sequence and the determinant of its matrix is Catalecticant, where the latter property is the one that can be useful here. It may characterise the two indices of the double sequence.
The problem here is that whether we can characterise Hankel determinants of the given sequences or not. I think it may not be possible.
Incomplete Pseudocode
- Transform
datainto square matrix and use two indices to express doubles. - Loop the first index.
- Loop the second index.
- Set
counterif two vectors (1st and 2nd indexes) are the same. - Reset
counterif the third vector is not expected as the previous two. - Go back to (1).
- End at end of data.
- Set
How can you find double Sequence in the data?