igraph-help
[Top][All Lists]
Advanced

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

[igraph] Graph isomorphism


From: priyanka nimavat
Subject: [igraph] Graph isomorphism
Date: Tue, 7 Jul 2015 14:40:58 +0530

Hi all,
i am having problem in finding graph isomorphism together of 5 graph objects.As an example my r script is as follow.

g1 <- graph.ring(10 , directed = FALSE)
g2 <- graph.ring(5 , directed = FALSE)
g3 <- graph.ring(7 , directed = FALSE)
g4 <- graph.ring(6 , directed = FALSE)
g5 <- graph.ring(8 , directed = FALSE)

g <- list(g1,g2,g3,g4,g5)
g


iso = function(g , i ,j)
{
  r <- graph.isomorphic(g[i],g[j])
  return(r)
}

for(i in 1:5)
{
  for(j in 1:5)
  {
    r= iso(g , i , j)
    print(r)
  }
}

It is giving an error that g is not a graph object. Because in function graph.isomorphic it is only accepting graph objects. Is there any way to find isomorphism of multiple graph objects together using for loop.
Thanks.


reply via email to

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