I'm looking for some sort of algorithm so I can quickly identify similar matrices, the matrices are not stored permanently so I'd need a way of mapping each matrix to an easily stored values, after which I can use the same mapping on future matrices and quickly compare against the calculated values.
The way I'm defining a similar matrix is simply whether or not they are identical when mirrored by vertical line, horizontal line, major diagonal and minor diagonal.
For example
1 2 3
4 5 6
7 8 9
is identified as the same as all the following matrices
3 2 1
6 5 4
9 8 7
-----
7 8 9
4 5 6
1 2 3
-----
1 4 7
2 5 8
3 6 9
-----
9 6 3
8 5 2
7 4 1
I've been stumped on this problem for days now, the matrices aren't stored permanently therefore comparing them directly isn't possible. Could anyone point me in the right direction? Thanks