Closed benoitgaudou closed 8 years ago
It is now fixed. Note that you have a small error in your example: in the GAMA model, you have 5 nodes, and only 4 in the R script. If you remove the last node in the GAMA model, you will get the same result as with R.
Steps to reproduce
global { graph g <- graph([]);
}
species people{ }
Expected behavior
R software provides for an equivalent undirected network the result [0 2 2 0](or for directed network [0 4 4 0]). ( library(igraph) mg <- matrix(c(c(0,1,0,0),c(1,0,1,0),c(0,1,0,1),c(0,0,1,0)), ncol=4, byrow=T) ' g1 <- graph_from_adjacency_matrix( mg ) g1 <- graph_from_adjacency_matrix( mg, mode = "undirected") g1 betweenness(g1)) )
Actual behavior
I get following result: map([people(1)::7.0,people(2)::10.0,people(3)::9.0,people(4)::4.0]) (even for directed or undirected network)
System and version
GAMA Git MACOsX