@@ -617,7 +617,7 @@ cdef codeword *expand_to_ortho_basis(BinaryCode B, int n) noexcept:
617617 i = k
618618 word = < codeword> 1 << k
619619 k += 1
620- else : # NOTE THIS WILL NEVER HAPPEN AS CURRENTLY SET UP!
620+ else : # NOTE THIS WILL NEVER HAPPEN AS CURRENTLY SET UP!
621621 temp = (< codeword> 1 << k) - 1
622622 i = k
623623 word = < codeword> 1 << k
@@ -813,7 +813,7 @@ cdef class BinaryCode:
813813 combination ^= (1 << j)
814814 word ^= self_basis[j]
815815
816- else : # isinstance(arg1, BinaryCode)
816+ else : # isinstance(arg1, BinaryCode)
817817 other_basis = other.basis
818818 for i from 0 <= i < nrows- 1 :
819819 self_basis[i] = other_basis[i]
@@ -2423,9 +2423,12 @@ cdef class PartitionStack:
24232423 cdef int * self_wd_lvls = self .wd_lvls
24242424 cdef int * self_wd_ents = self .wd_ents
24252425 while True :
2426- if CG.is_one(self_wd_ents[wd_ptr], col): i += 1
2427- if self_wd_lvls[wd_ptr] > k: wd_ptr += 1
2428- else : break
2426+ if CG.is_one(self_wd_ents[wd_ptr], col):
2427+ i += 1
2428+ if self_wd_lvls[wd_ptr] > k:
2429+ wd_ptr += 1
2430+ else :
2431+ break
24292432 return i
24302433
24312434 def _wd_degree (self , C , wd , col_ptr , k ):
@@ -3347,15 +3350,17 @@ cdef class BinaryCodeClassifier:
33473350 if qzb > 0 : zb__Lambda_rho[k] = Lambda[k]
33483351 state = 3
33493352
3350- elif state == 3 : # attempt to rule out automorphisms while moving down the tree
3353+ elif state == 3 : # attempt to rule out automorphisms while moving down the tree
33513354 # if k > hzf, then we know that nu currently does not look like zeta, the first
33523355 # terminal node encountered, thus there is no automorphism to discover. If qzb < 0,
33533356 # i.e. Lambda[k] < zb[k], then the indicator is not maximal, and we can't reach a
33543357 # canonical leaf. If neither of these is the case, then proceed to state 4.
3355- if hzf__h_zeta <= k or qzb >= 0 : state = 4
3356- else : state = 6
3358+ if hzf__h_zeta <= k or qzb >= 0 :
3359+ state = 4
3360+ else :
3361+ state = 6
33573362
3358- elif state == 4 : # at this point we have -not- ruled out the presence of automorphisms
3363+ elif state == 4 : # at this point we have -not- ruled out the presence of automorphisms
33593364 if nu.is_discrete(k):
33603365 state = 7
33613366 continue # we have a terminal node, so process it
@@ -3365,17 +3370,18 @@ cdef class BinaryCodeClassifier:
33653370 # equal to its minimum element
33663371 v[k] = nu.new_first_smallest_nontrivial(k, W, self .Phi_size * k)
33673372 if not nu.sat_225(k): hh = k + 1
3368- e[k] = 0 # see state 12 and 17
3369- state = 2 # continue down the tree
3373+ e[k] = 0 # see state 12 and 17
3374+ state = 2 # continue down the tree
33703375
3371- elif state == 5 : # same as state 3, but in the case where we haven't yet defined zeta
3372- # i.e. this is our first time down the tree. Once we get to the bottom,
3373- # we will have zeta = nu = rho, so we do:
3376+ elif state == 5 :
3377+ # same as state 3, but in the case where we haven't yet defined zeta
3378+ # i.e. this is our first time down the tree. Once we get to the bottom,
3379+ # we will have zeta = nu = rho, so we do:
33743380 zf__Lambda_zeta[k] = Lambda[k]
33753381 zb__Lambda_rho[k] = Lambda[k]
33763382 state = 4
33773383
3378- elif state == 6 : # at this stage, there is no reason to continue downward, so backtrack
3384+ elif state == 6 : # at this stage, there is no reason to continue downward, so backtrack
33793385 j = k
33803386
33813387 # return to the longest ancestor nu[i] of nu that could have a
@@ -3396,9 +3402,10 @@ cdef class BinaryCodeClassifier:
33963402 else :
33973403 k = hh- 1
33983404 # TODO: is the following line necessary?
3399- if k == - 1 : k = 0
3405+ if k == - 1 :
3406+ k = 0
34003407
3401- if hb > k:# update hb since we are backtracking
3408+ if hb > k: # update hb since we are backtracking
34023409 hb = k
34033410 # if j == hh, then all nodes lower than our current position are equivalent, so bail out
34043411 if j == hh:
@@ -3465,7 +3472,7 @@ cdef class BinaryCodeClassifier:
34653472
34663473 state = 10
34673474
3468- elif state == 9 : # nu is a better guess at the canonical label than rho
3475+ elif state == 9 : # nu is a better guess at the canonical label than rho
34693476 rho = PartitionStack(nu)
34703477 k_rho = k
34713478 qzb = 0
@@ -3475,7 +3482,7 @@ cdef class BinaryCodeClassifier:
34753482 zb__Lambda_rho[k+ 1 ] = - 1
34763483 state = 6
34773484
3478- elif state == 10 : # we have an automorphism to process
3485+ elif state == 10 : # we have an automorphism to process
34793486 # increment l
34803487 if l < self .L- 1 : l += 1
34813488 # store information about the automorphism to Omega and Phi
@@ -3496,8 +3503,8 @@ cdef class BinaryCodeClassifier:
34963503 Omega[ii] ^= (1 << j) # so cancel
34973504 j = col_gamma[j] # cellmates
34983505 i += 1
3499- while i < ncols and not Omega[ii]& (1 << i): # find minimal element
3500- i += 1 # of next cell
3506+ while i < ncols and not Omega[ii]& (1 << i): # find minimal element
3507+ i += 1 # of next cell
35013508 i = 0
35023509 jj = self .radix
35033510 while i < nwords:
0 commit comments