Hello All,

I'm trying to implement the Nagamochi-Ibaraki algorithm and have the
following problem:

I have picked two vertices, say "x" and "y" that need to be contracted into
a single vertex. I have tried to understand the contract.vertices function
but the mapping parameter is confusing me. The total vertices in my graph
are 26, and they will be contracted recursively until I have only 2 nodes
left. Can you please help me with this? I'm not sure what I'm doing wrong.

My graph is this: g1 <- barabasi.game(26, m=4, directed=FALSE,
algorithm="bag")

And after I pick two nodes, say 25, 26, which have multiple edges between
them, I'm trying to merge them into a single vertex:

> g2 <- contract.vertices(g1,(25:26),vertex.attr.comb=toString)
Error in contract.vertices(g1, (25:26), vertex.attr.comb = toString) :
  At structural_properties.c:6922 : Invalid mapping vector length, Invalid
value

Thank you,
Krishna.
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to