[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms
From: |
Tamás Nepusz |
Subject: |
Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms |
Date: |
Wed, 12 Aug 2015 08:44:37 +0200 |
Hi,
> Is there a similar function to as_edgelist( graph ) but only providing edges
> incident to the specified vertices in the following way: as_edgelist( graph,
> vertices ).
incident(graph, vertex) and incident_edges(graph, vertices) does exactly that
if I remember correctly.
> This is based on my experience that the numeric matrix returned by
> as_edgelist is more convenient and faster to further process than list.
It could be the case, but I'm not sure whether that's the real bottleneck in
your code. Have you tried profiling it to see which parts are responsible for
most of the execution time?
> On the other hand, I'm using python as well. So what is situation on the
> python side?
They both rely on the same set of core C routines so I don't think there would
be a big difference - one possible optimization would be to use Python's
built-in set type for set intersections and exclusions (basically you
pre-compute the incidence list for each vertex as a Python dict mapping vertex
indices to sets). Maybe you could also use another dict as a cache that
memorizes the computed indices for edges incident on a specific edge so you
don't calculate it over and over again when your random walker is stuck in a
part of a graph - but the benefits of such a solution depend on the structure
of your graph
T.
- [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Phil Cui, 2015/08/04
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Tamas Nepusz, 2015/08/06
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Phil Cui, 2015/08/07
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Phil Cui, 2015/08/07
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Tamas Nepusz, 2015/08/10
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Phil Cui, 2015/08/10
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Tamas Nepusz, 2015/08/11
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Phil Cui, 2015/08/11
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms,
Tamás Nepusz <=
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Phil Cui, 2015/08/13
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Phil Cui, 2015/08/13
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Tamas Nepusz, 2015/08/14
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Phil Cui, 2015/08/14
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Dr Gregory Jefferis, 2015/08/14
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Phil Cui, 2015/08/18
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Dr Gregory Jefferis, 2015/08/18
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Phil Cui, 2015/08/18
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Tamas Nepusz, 2015/08/14
- Re: [igraph] Retrieve nodes forming a motif with subgraph_isomorphisms, Phil Cui, 2015/08/14