[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [igraph] How to transform nodes into (sub(graphs

**From**: |
Raphael Clifford |

**Subject**: |
[igraph] How to transform nodes into (sub(graphs |

**Date**: |
Thu, 18 Jul 2013 13:41:20 +0100 |

In python I have a directed multi-graph g . I would like to make a new
graph h where each node in g is replaced by a small graph that depends
on the in and out degrees of the node it is replaced. The small graphs
will be connected to each by some rule that depends on how the
original nodes they replaced were connected (actually attributes of
the edges in the original graph).
I have written some code that goes through the nodes and makes a list
of replacement graphs. How can I now make a new graph h from these
small graphs? My problem is that disjoint union will renumber the
vertices making it hard to work out which nodes to connect to which.
Raphael

**[igraph] How to transform nodes into (sub(graphs**,
*Raphael Clifford* **<=**