Thanks, David,
I think that the problem is with the operation "+" I have using Profiler
and when the matrix has dimensios, 12 x 19 these are the times
9.932s -- line 15: v = (particular_soln + homogeneous_soln)
0.004s -- line 17: print len(v.nonzero_positions())
Maybe there is some way to sum p
On Sun, Feb 25, 2018 at 4:11 PM, Juan Grados wrote:
> 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
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_k
Thanks, Moritz.
I found a solution which used strings instead of tuples:
for v in G.vertex_iterator():
v.rename(str(v)[12:])
Probably not as elegant as your solution, but it did the job!
-Alasdair
On Monday, 26 February 2018 06:22:32 UTC+11, moritz wrote:
>
>
>
> On Saturday, February 24,
On Saturday, February 24, 2018 at 9:56:04 AM UTC+1, Alasdair wrote:
>
> Hello,
>
> I have defined a polyhedron by a collection of linear inequalities over
> three variables, and it's all lovely: I can access the vertices, draw all
> sorts of nice pictures, get all sorts of information. The one