|
From: | Richard Geddes |
Subject: | Re: [igraph] Question on max id node |
Date: | Mon, 10 Mar 2008 20:00:44 -0400 |
User-agent: | Thunderbird 2.0.0.12 (X11/20080227) |
G, I think the problem is in the file format end-of-line character of the file, which originally was made on a windows machine. I converted the dos format to linux with tr -d '\r' < dos.pairs > linux.pairs and results are consistent now. I've attached the file in question (dos.pairs) and the linux version so you can verify. I had this problem not too long ago with some scripting code I was writing and should have suspected the same was happening here. ... I ran the update routine: $0> cd (path to)igraph-dev-0.6 $0> tla update $0> ./bootstrap.sh $0> ./configure $0> make $0> sudo make installThe 'make check' returned a value of 0 (good) Yes, I follow about the internal renaming of the nodes... Is the attribute method the best method to get at the internal igraph node id values... I didn't really get to that part yet. R Gabor Csardi wrote: Ok, i've no idea what is going on, but some clarification won't hurt. 'ncol' uses symbolic vertex names, i.e. instead of numbers you can have something like foo bar bat foobar etc... in your file. If you have numbers, those are treated like strings as well. So if you have an edge list file with numbers and read it with 'ncol', then nothing ensures that vertex named '1' will get internal igraph vertex id 1. So having different node id's in the two graph is allright. Actually, having a slightly different merge matrix can be OK too, since having different internal vertex ids can result different merges if there are two (or more) merges that increase the modularity with the same amount. So the output for my file can be still ok, although i haven't checked it. You can call igraph_isomorphic to be sure that the two graphs (the 'ncol' one and the 'egelist' one) are the same indeed. What bothers me is the number of vertices in the 'ncol' graph. That cannot be bigger than the one for the 'edgelist' graph by definition. Still, i cannot reproduce it. Please tell me exactly, which version do you use? The latest patch? igraph--main--0.6--patch-29 ? Could you reinstall igraph and try it again? Does 'make check' run fine? Could you send the edge list file as an attachment? Just in case there are some strange characters in it that look space/tab when including it in the email text. Thanks, G. On Mon, Mar 10, 2008 at 05:15:50PM -0400, Richard Geddes wrote: [...] |
0 1 0 2 0 10 1 2 1 10 2 3 3 4 3 5 3 6 4 7 4 8 4 9 5 6 5 7 6 7 6 8 6 9 7 8 8 9
0 1 0 2 0 10 1 2 1 10 2 3 3 4 3 5 3 6 4 7 4 8 4 9 5 6 5 7 6 7 6 8 6 9 7 8 8 9
[Prev in Thread] | Current Thread | [Next in Thread] |