I have a symmetric adjacency matrix with zero value on its diagonal. now i am looking for reordering method to show community which divides the matrix in two cliques with +1 and -1 values respectively. it would be appreciated if someone could help me in this regards.
for instance: matrix(10,10)
0 1 -1 1 1 -1 1 1 -1 -1
1 0 -1 1 1 -1 1 -1 -1 -1
-1 -1 0 -1 -1 1 1 1 1 -1
1 1 -1 0 1 -1 1 -1 -1 -1
1 1 -1 1 0 -1 1 1 -1 -1
-1 -1 1 -1 -1 0 -1 1 1 1
1 1 1 1 1 -1 0 1 1 1
1 -1 1 -1 1 1 1 0 -1 -1
-1 -1 1 -1 -1 1 1 -1 0 1
-1 -1 -1 -1 -1 1 1 -1 1 0
output must be :
1 1 1 1 1 -1 -1 -1 -1 -1
1 1 1 1 1 -1 -1 -1 -1 -1
1 1 1 1 1 1 -1 -1 -1 -1
1 1 1 1 1 -1 -1 -1 -1 -1
1 1 1 1 1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 1 1 1 1 1
-1 -1 -1 -1 -1 1 1 1 1 1
-1 -1 -1 -1 -1 1 1 1 1 1
-1 -1 -1 -1 -1 1 1 1 1 1
-1 -1 -1 -1 -1 1 1 1 1 1
zero entries can be considered as 1