igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Creating new graph from existing graph with only top 10 per


From: Tamás Nepusz
Subject: Re: [igraph] Creating new graph from existing graph with only top 10 percent of edges
Date: Fri, 6 Jul 2012 00:32:29 +0200

Hi Alex, 

You haven't specified whether you are working with igraph from C, R or Python, 
so I'll only give you a few pointers first:

1. Retrieve all the edge weights and find the indices of the top 10%.
2. Use igraph_subgraph_edges from C, subgraph.edges from R or 
Graph.subgraph_edges() from Python to extract the subgraph that contains the 
selected edges only. Set the delete_vertices argument to false to keep all the 
vertices even if some of them are not incident on the selected edges.

Best,
-- 
T.


On Thursday, 5 July 2012 at 19:12, Alex Upton wrote:

> 
> 
> Hi all,
> 
> I have a query that hopefully will be easy to resolve. I have a weighted 
> graph, g1, that has various edge weights. What I would like to do is create 
> another graph, let's call it g2, that contains only the top 10 percent of the 
> edges in g1, i.e. the 10 percent of edges in g1 with the highest weight. How 
> would I go about doing this? Any help is gratefully appreciated.
> 
> 
> Regards,
> 
> Alex
> ___________________________________________________________________
> 
> 
> Alex Upton, BEng, MRes, PG Cert Business Administration
> PhD Researcher Biomedical Informatics, Signals and Systems 
> School of Electronic, Electrical and Computer Engineering, 
> College of Engineering and Physical Sciences, University of Birmingham
> Edgbaston, Birmingham, B15 2TT, United Kingdom
> 
> Fax: +44 121 4144291 (school general office)
> Email: address@hidden (mailto:address@hidden)
> 
> Personal Web: http://postgrad.eee.bham.ac.uk/uptona/
> __________________________________________________________________
> _______________________________________________
> igraph-help mailing list
> address@hidden (mailto:address@hidden)
> https://lists.nongnu.org/mailman/listinfo/igraph-help






reply via email to

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