1
我想在igraph R包中應用is_matching函數。我不知道爲什麼我的答案總是錯誤的,即使它明顯是匹配的。這裏是我的代碼:R igraph is_matching always False
library(igraph)
relations=data.frame(from=c(1,2),to=c(3,4))
g <- graph_from_data_frame(relations, directed=FALSE, vertices=1:4)
mm=c(1,3)
is_matching(g,mm)
[1] FALSE
我真的很感謝任何幫助!
能否請您提供一個更好的重複性示例以及必要的庫 –
這個玩具示例中使用的兩個函數都在R庫(igraph)中。 – Rocky