How can I improve the time for the next code?. Basically, I want to solve a
large undetermined binary linear system and then I need to calculate its
hamming weight.

A = random_matrix(GF(2), 10, 12, density=0.55)
b = random_vector(GF(2), 10)
particular_soln = A.solve_right(b, check=False)
A_right_kernel = A.right_kernel()
for homogeneous_soln in A_right_kernel:
    v = (particular_soln + homogeneous_soln)
    print len(v.nonzero_positions())


-- 
---------------------------------------------------------------------
MSc. Juan del Carmen Grados Vásquez
Laboratório Nacional de Computação Científica
Tel: +55 21 97633 3228
(http://www.lncc.br/)
http://juaninf.blogspot.com
---------------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to