Changeset 7770:b786895b1e12
- Timestamp:
- 11/27/07 16:52:14 (5 years ago)
- Branch:
- default
- File:
-
- 1 edited
-
sage/coding/binary_code.pyx (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/coding/binary_code.pyx
r7769 r7770 2295 2295 2296 2296 badass = 0 2297 LLL = [] 2297 2298 2298 2299 state = 1 2299 2300 while state != -1: 2300 if False:#badass > 39: 2301 print badass 2302 if False:#badass > 620: 2303 print '-----' 2304 print badass 2305 print "k:", k 2306 if k != -1: 2307 if v[k]&nu.flag: 2308 print "v[k]: word ", v[k]^nu.flag 2309 else: 2310 print "v[k]: col ", v[k] 2311 if tvc&nu.flag: 2312 print "tvc- wd", tvc^nu.flag 2313 else: 2314 print "tvc- col", tvc 2315 if W[self.Phi_size * k]: 2316 print "W[k]: cols", Integer(W[self.Phi_size * k]).binary() 2317 else: 2318 j = nwords/self.radix 2319 if nwords%self.radix: 2320 j += 1 2321 L = '' 2322 for i from 0 <= i < j: 2323 if i == j - 1: 2324 jj = nwords%self.radix 2325 if jj == 0: 2326 jj = self.radix 2327 else: 2328 jj = self.radix 2329 for ii from 0 <= ii < jj: 2330 if W[self.Phi_size * k + 1 + i] & (1 << ii): 2331 L += '1' 2332 else: 2333 L += '0' 2334 print "W[k]: words", L#[Integer(W[self.Phi_size * k + 1 + i]).binary() for i from 0 <= i < j] 2335 print "state:", state 2336 print '-----' 2337 if False:#badass > 620: 2301 2338 print '-----' 2302 2339 print badass … … 2458 2495 2459 2496 nu.get_permutation(zeta, word_gamma, col_gamma, ham_wts) 2460 # print "gamma:", [word_gamma[i] for i from 0 <= i < nwords], [col_gamma[i] for i from 0 <= i < ncols] 2497 #if badass > 620: 2498 print "gamma:", [word_gamma[i] for i from 0 <= i < nwords], [col_gamma[i] for i from 0 <= i < ncols] 2499 print Theta 2461 2500 # if C^gamma == C, the permutation is an automorphism, goto 10 2501 #if badass > 620: 2502 print C.is_automorphism(col_gamma, word_gamma) 2462 2503 if C.is_automorphism(col_gamma, word_gamma): 2463 2504 state = 10 2464 2505 else: 2506 LLL.append([[col_gamma[i] for i from 0 <= i < ncols],[word_gamma[i] for i from 0 <= i < nwords]]) 2465 2507 state = 8 2466 2508 … … 2483 2525 # if C(nu) == C(rho), get the automorphism and goto 10 2484 2526 rho.get_permutation(nu, word_gamma, col_gamma, ham_wts) 2485 # print "gamma:", [word_gamma[i] for i from 0 <= i < nwords], [col_gamma[i] for i from 0 <= i < ncols] 2527 #if badass > 620: 2528 print "gamma:", [word_gamma[i] for i from 0 <= i < nwords], [col_gamma[i] for i from 0 <= i < ncols] 2529 print Theta 2486 2530 state = 10 2487 2531 … … 2541 2585 # Now incorporate the automorphism into Theta 2542 2586 j = Theta.merge_perm(col_gamma, word_gamma) 2543 # if not j: print "no j" 2587 if badass > 620: print Theta 2588 2544 2589 # j stores whether anything happened or not- if not, then the automorphism we have 2545 2590 # discovered is already in the subgroup spanned by the generators we have output … … 2756 2801 state = 13 2757 2802 2803 for LL in LLL: 2804 print LL, ',\\' 2758 2805 # end big while loop 2759 2806 rho.find_basis(ham_wts)
Note: See TracChangeset
for help on using the changeset viewer.
