Hello,
Thank you. Sounds a good way doing it. I am actually defining my edge types with an attribute. This is likely working for my first question. Can the below be optimized ?
g <- graph.atlas(711)
E(g)$type <- c(1,2,3,4,3,2,1,1,3,2)
E(g)$color <- ifelse(E(g)$type>=3,"blue","yellow")
# I can separate by graph
g2 <- subgraph.edges(g,which(E(g3)$type>=3),delete.vertices =FALSE)
g3 <- subgraph.edges(g,which(E(g3)$type<3),delete.vertices =FALSE)
# Identification of nodes having edges in both graphs
which(ifelse(degree(g2)>0,1,0) + ifelse(degree(g3)>0,1,0) > 1)
As far as my second question is concerned, if for instance I have the requirement that I should not have blue edges between 2 different nodes, without having another orange edges between those two nodes (that is 6->5, 5->4, 4->3,3->7 are all violating this requirement) how could I measure that ? Otherwise said, how can I measure the fact that edges of a given subgraph exist as well in another subgraph ?
Kind regards,