[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] undirected graph console output
From: |
Jey Narasimhan |
Subject: |
[igraph] undirected graph console output |
Date: |
Thu, 5 Mar 2015 21:34:25 -0500 |
Hi,
Here is the edgelist from the data source for an undirected graph:
55657 59107 3 1 2009 7 54 29 6
59107 55657 3 1 2009 7 54 41 6
55657 is the vertex name of n58547 and 59107 is the vertex name of n61094.
This is the corresponding graphml written by python-igraph:
<edge source="n58547" target="n61094">
<data key="e_wd">6</data>
<data key="e_weight">1</data>
<data key="e_sec">28469</data>
<data key="e_mon">1</data>
<data key="e_year">2009</data>
<data key="e_day">3</data>
</edge>
<edge source="n58547" target="n61094">
<data key="e_wd">6</data>
<data key="e_weight">1</data>
<data key="e_sec">28481</data>
<data key="e_mon">1</data>
<data key="e_year">2009</data>
<data key="e_day">3</data>
</edge>
And, when I print the graph:
45800 -- 11177, 11177, 46813, 46813, 10168, 368, 10591
51938 -- 18485, 32767, 32767
59999 -- 42981, 38338, 38338
60688 -- 45643
59233 -- 59230
47696 -- 28557
60784 -- 26345, 26345
59107 -- 55657, 55657
61125 -- 21828
I understand for an undirected the order of vertices does not matter,
but why is igraph not having a consistent display?
1) In the graphml output, for both edges, it is seeing 55657 as the
source, for which I would have preferred seeing the same order in the
data source.
2) In the string representation of the graph, why is 59107 seen as the
source when the graphml file tells otherwise?
3) Furthermore, is there any pattern that is followed when printing
the adjacency list? What I find is that generally the source has
higher vertex ID, but there are vice versa cases too.
Thanks.
- [igraph] undirected graph console output,
Jey Narasimhan <=