On 09/27/2007 11:01 AM, Xiaodan Liu wrote:
I got your email from the Graph-tool mail list. I'm a new user of graph-tool. I just met some questions that confused me a lot:
Thanks for using graph-tool, and we're happy to answer any question you may have, but please use the mailing list, and do not email people individually like that. The mailing list exists exactly for this purpose...
I got the file "test.dot" which is a three vertices directed full graph. Its content is like is: digraph G{ 2000->2001;2000->2002; 2001->2000;2001->2002; 2002->2000;2002->2001; }
Question 1:
When I input the command line like this to get in-degree:
$graph-tool --load test.dot --vertex-histogram="in-degree|-"
I got the output like this: 2.0 6
Could you tell me what are the meanings of the above two values?
The fist column is the in-degree and the second is the number of vertices, which is quite strange since your graph has 3 vertices, not 6. I tested this command with your graph with the current development version of graph-tool and got the same result as Andrea Perna:
$ graph-tool --load foo2.dot --vertex-histogram="in-degree|-" # vertex histogram (in-degree): 2.0 3
Question 2:
When I input the command line like this to get distance: $graph-tool --load test.dot --distance-histogram=-
I got the output like this: 1.0 12
Could you tell me what are the meanings of the above two values?
It says there are 12 distances of size 1 in the graph, which is false, since it should be 3 x (3-1) = 6. Are you sure you loaded the same graph you sent in your email? If yes, please tell us which version of the program, which compiler version, and which platform you are using.
Cheers, Tiago