[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [igraph] ID's for nodes/vertices

**From**: |
Tamas Nepusz |

**Subject**: |
Re: [igraph] ID's for nodes/vertices |

**Date**: |
Mon, 11 Jul 2011 16:32:02 +0200 |

**User-agent**: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10 |

>* Also with the correct code for "similarity inverse log weighted"*
>* *
>* a = i.similarity_inverse_log_weighted(vertices=33,23)*
This is definitely not correct Python syntax; you have a positional argument
(23) after a keyword argument (vertices=...) - although this has nothing to
do with the MemoryError of course.
I have just generated a random graph with 20000 vertices and it seems to
work with similarity_inverse_log_weighted, so I don't know what's going on here:
>*>> g = Graph.GRG(20000, 0.01)*
>*>> print g.vcount()*
20000
>*>> print g.ecount()*
62685
>*>> a = g.similarity_inverse_log_weighted(vertices=33)*
>*>> len(a)*
1
>*>> len(a[0])*
20000
So it seems to work. If you still have problems, please send me your graph
so I can take a look at it.
>* Does this function also convert the graph into a matrix like object?*
No, it does not. The result will be a list of lists, however, that's why you
shouldn't simply pass all the vertices to the function (because the
resulting matrix would be too large to keep it in memory for a graph with
20K vertices), but it should work if you pass vertices in small batches.
--
T.