> The oncoming questions are: what is the most efficient way to find the > incident edges of the current edge? If your graph is relatively small and you are going to perform this type of query many times, the easiest it to create the line graph of the graph and then use neighbors() on the line graph. This works because every vertex of the line graph corresponds to the edge with the same index in the original graph, and two vertices in the line graph are connected if the corresponding edges share a vertex in the original graph. So, something like:
g_LineGraph <- line.graph(g_OriginGraph) IncidentEdgeIds <- neighbors(g_LineGraph, CurrentEdgeId) You can basically consider the line graph as an efficient data structure that pre-computes and lists all edges incident on a specific edge in the original graph. T. _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
