igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] subtraction?


From: Marco
Subject: Re: [igraph] subtraction?
Date: Thu, 21 May 2009 12:42:54 +0200

Hi Tamas!

First let me thank you for your always fast and accurate answers.

I have a graph g built in some way (basically random graphs, different
models), and a graph h which is the kcore(k) [for one k in N] of g.

I use python, btw.

I am not sure I understood the use of subgraph here....

marco

--
restituiremo il riso ai salici



On Thu, May 21, 2009 at 12:40 PM, Tamas Nepusz <address@hidden> wrote:
> Hi Marco,
>
> It depends on how that subgraph is specified. If you know the assignment
> between vertices of g and h (i.e., you know that, say, vertex X in h
> belongs to vertex Y in g for all X), you can simply use igraph_subgraph()
> in C or Graph.subgraph() in Python (sorry, I don't know it by heart for R,
> but I guess it's simply subgraph()), or you can also use
> igraph_delete_vertices() or Graph.delete_vertices() on g if you don't
> need g afterwards.
>
> If you don't know the mapping from vertices of h to vertices of g, but
> you know that h is a subgraph of g and it is unique, you can use
> igraph_get_subisomorphisms_vf2 (or Graph.get_subisomorphisms_vf2) to
> find the mapping from vertices of h to vertices of g.
>
> --
> Tamas
>
> On Thu, May 21, 2009 at 11:44:19AM +0200, Marco wrote:
>> Hi all list!
>>
>> Let's suppose I have a graph g, and a subgraph of g, let's call it h.
>> I'd like to build the graph that is defined of all the vertices in g
>> that are not in h.
>> Edges are kept the same as in g if both the endvertices survive, or
>> are deleted if at least one of the endvertices is killed.
>>
>> How do it efficiently in igraph?
>>
>> thanks in advance as always,
>>
>> marco
>>
>> --
>> restituiremo il riso ai salici
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>




reply via email to

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