igraph-help
[Top][All Lists]
Advanced

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

[igraph] Re: Ruby binding for IGraph coreness


From: Thomas Plotkowiak
Subject: [igraph] Re: Ruby binding for IGraph coreness
Date: Wed, 12 Aug 2009 17:39:34 +0200

It seems its been a while since the igraph binding was updated:
IGraph 0.3 Released

I thought about using rsruby instead and then load the library into R , but somehow from rsruby after loading the igraph library r.library("igraph") i have no clue how to acess igraph.

2009/8/12 Thomas Plotkowiak <address@hidden>
I am experimenting with the ruby binding for igraph and the coreness function seems to be broken. I am able to load a graph into memory and run a couple of metrics on it, but when it comes to the g.coreness(1) function i am getting an array like this:

[0, 1, 0, true, 1, true, true, 1, true, 1, 1, true, true, 1, true, true, 1, true, true, true, true, true, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, .... ]


According to the manual this function should give me: “This function calculates the coreness for each vertex. Return Value: Numeric vector of integer numbers giving the coreness of each vertex.” How can “true” be a correct value?

If i run the same function in the R Environment in Windows i am getting:

graph.coreness(G, mode="all")
   [1] 0 5 5 4 5 5 4 5 5 6 5 5 5 5 5 4 5 7 5 5 3 5 5 5 5 1 1 2 1 2 5 1 1 5 1 2 1
  [38] 3 1 1 1 1 2 1 1 2 1 1 1 2 1 1 1 1 1 1 3 1 1 4 3 2 4 1 1 2 3 1 2 2 2 3 2 1
  [75] 5 1 2 1 2 2 1 2 3 4 3 1 3 2 1 2 2 2 2 5 1 1 4 2 2 1 2 2 3 3 2 2 4 2 1 3 3
 [112] 2 3 3 2 1 3 1 1 1 1 4 2 1 1 1 2 1 2 2 1 1 4 1 2 3 4 3 3 4 3 1 4 1 2 2 2 5
 [149] 2 2 3 2 1 2 3 2 2 2 2 2 4 4 1 1 2 4 1 4 2 3 1  ... ]

which definitely seems to be the correct return value.

Anybody got any hints on that or how to fix it?

Cheers
THomas


reply via email to

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