#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10
set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g
M<-as.numeric(pcds::runif.tri(1,Tr)$g)
#For the underlying graph
(num.edgesAStri(Xp,Tr,M)$num.edges)/(n*(n-1)/2)
ASedge.dens.tri(Xp,Tr,M)
ASedge.dens.tri(Xp,Tr,M,in.tri.only = TRUE)
#For the reflexivity graph
(num.edgesAStri(Xp,Tr,M,ugraph="r")$num.edges)/(n*(n-1)/2)
ASedge.dens.tri(Xp,Tr,M,ugraph="r")
ASedge.dens.tri(Xp,Tr,M,in.tri.only = TRUE,ugraph="r")
#}
Run the code above in your browser using DataLab