fix bug
This commit is contained in:
		@@ -30,9 +30,8 @@ def cogirthip(bases, integral=true):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
cnt=0   # actual number of instances tested
 | 
					cnt=0   # actual number of instances tested
 | 
				
			||||||
f = lambda g: g.is_connected()
 | 
					f = lambda g: g.is_connected()
 | 
				
			||||||
for n in range(4,5):
 | 
					for n in range(4,20):
 | 
				
			||||||
    for g in filter(f, graphs(n)):
 | 
					    for g in filter(f, graphs(n)):
 | 
				
			||||||
        g=graphs.CompleteGraph(4)
 | 
					 | 
				
			||||||
        A=g.incidence_matrix()
 | 
					        A=g.incidence_matrix()
 | 
				
			||||||
        n,m = A.dimensions()
 | 
					        n,m = A.dimensions()
 | 
				
			||||||
        # enumerate all vectors in F_2^n with even number of 1s
 | 
					        # enumerate all vectors in F_2^n with even number of 1s
 | 
				
			||||||
@@ -50,6 +49,6 @@ for n in range(4,5):
 | 
				
			|||||||
            if gap > 2.01:
 | 
					            if gap > 2.01:
 | 
				
			||||||
                print(f"bad example! gap={gap}")
 | 
					                print(f"bad example! gap={gap}")
 | 
				
			||||||
                with open("projection.out", "a") as f:
 | 
					                with open("projection.out", "a") as f:
 | 
				
			||||||
                    f.write(str(A_t)+"\n\n")
 | 
					                    f.write(str(gap)+"\n"+str(A_t)+"\n")
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                print(f"n={n},m={m},gap={gap}")
 | 
					                print(f"n={n},m={m},gap={gap}")
 | 
				
			||||||
		Reference in New Issue
	
	Block a user