Error in finding cliques
I have the following code
f = open("42-matrix-of-size-378.txt", "r")
g = f.read()
l = g.split('-------------------------------')
matrix_list = {}
for i in range(0, 1):
s = l[i].split()
s.remove(s[0])
A = matrix_maker(s)-matrix.identity(378)
G=Graph(A, format='adjacency_matrix',loops=False)
d = {i: [G.clique_number()]}
matrix_list.update(d)
print(matrix_list)
But I got the following error:
the adjacency matrix of a non-weighted graph must have zeroes on the diagonal
Could you please provide a way to fetch the
42-matrix-of-size-378.txt
file so that we can see the actual issue ? If this is not possible, could you please provide a way to construct the matrixA
?