grafi e dintorni

non provate a creare (in python e con primitive standard, mentre con le ctypes potrebbe funzionare) una matrice di adiacenza per un grafico di 250mila nodi… e’ un filino troppo grossa… 😀

…ovviamente ho dovuto killare il processo. Ok che OsX e’ figo, ma vi sareste fidati a continuare a lasciar swappare un processo da 10Gb ?

+ + +

[EN] adjacency matrix (with standard python primitives) for a graph of 250.000 Vertex ? FAIL!

* * *

p.s. it might be my implementation… this is the initialization of the datastructure…

tot = 250000
adj_matrix = [[0]*tot]*tot

…but it was not behaving correctly, so I switched to a for loop with append() … which was giving then problems with memory.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s