[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] selecting random nodes from the graph

From: Gábor Csárdi
Subject: Re: [igraph] selecting random nodes from the graph
Date: Sat, 25 Jan 2014 22:51:08 -0500

Nodes are numbered. 

In R:
sample(vcount(g), 1000)

In Python:
import random
random.sample(range(g.vcount()), 1000)


On Sat, Jan 25, 2014 at 10:42 PM, Ahmed Abdeen Hamed <address@hidden> wrote:
Hello again everyone!

What function to use for selecting random nodes? Say I have a 10,000 nodes graph and I want to select a 1000. I can't find the sampling function. I am looking for something simple but Gibbs or Metropolis Sampling will be good!

Thanks in advance!


igraph-help mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]