[Top][All Lists]

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

[igraph] Merging subtrees based on an edge attribute

From: David Edwards
Subject: [igraph] Merging subtrees based on an edge attribute
Date: Thu, 24 Jan 2013 08:53:14 +0000

Dear all


Any suggestions or hints as to how I might approach the following problem would be gratefully received.


I have a large tree G whose edges have a discrete attribute “type”, for example an integer. I want to merge two subtrees of G of the form “a source node plus its descendents” in a way that respects the edge types. That is to say I want to merge pairs of nodes for which the paths from their respective source node have the same sequence of edge types. When I can identify the node pairs I can use contract.vertices, but how do I identify the node pairs?




reply via email to

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