igraph-help
[Top][All Lists]
Advanced

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

[igraph] sort an edge sequence


From: Ana Sofia Morais
Subject: [igraph] sort an edge sequence
Date: Sat, 17 Jul 2010 16:35:14 +0200

Hello,

 

I have an edge sequence taken from a directed graph, such as:

 

[55354] 1850 ->  618

[55355] 1850 ->  750

[55356] 1850 -> 1914

[55357] 1850 ->  649

[55358] 1850 -> 1160

[55359] 1850 ->  605

[55360] 1850 -> 2080

[55361] 1850 ->  563

[55362] 1850 ->   58

 

The first number in each line is the edge id. The second number and third numbers are the ids of the vertices that send and receive the edge, respectively.

 

The edge sequence is ordered by the edge ids. What I need to do is to sort the edge sequence by the id of the endpoint vertices, i.e., those that receive the edges. And I need to do so while preserving the edge ids.

 

I would be very  grateful if you could give me a suggestion to solve this problem.

 

Best,

 

Sofia


reply via email to

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