# NOT RUN {
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
M<-as.numeric(runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0);
r<-1.5
n<-10
set.seed(1)
dat<-runif.tri(n,Tr)$g
IndNPEtri(dat[1,],dat[2,],r,Tr,M)
P1<-as.numeric(runif.tri(1,Tr)$g)
P2<-as.numeric(runif.tri(1,Tr)$g)
IndNPEtri(P1,P2,r,Tr,M)
P1<-c(.4,.2)
P2<-c(1.8,.5)
IndNPEtri(P1,P2,r,Tr,M)
IndNPEtri(P2,P1,r,Tr,M)
IndNPEtri(P1,P1,r,Tr,M)
IndNPEtri(P2,P2,r,Tr,M)
P3<-c(1.7,.6)
IndNPEtri(P2,P3,r,Tr,M)
IndNPEtri(P3,P2,r,Tr,M)
M<-c(1.3,1.3)
r<-2
P1<-c(1.4,1.2)
P2<-c(1.5,1.26)
IndNPEtri(P1,P2,r,Tr,M)
IndNPEtri(P2,P1,r,Tr,M)
#or try
Rv<-rv.tri.cent(P1,Tr,M)$rv
IndNPEtri(P1,P2,r,Tr,M,Rv)
P2<-c(1.8,.5)
P3<-c(1.7,.6)
IndNPEtri(P2,P3,r,Tr,M)
dat.fr<-data.frame(a=Tr)
IndNPEtri(P2,P3,r,dat.fr,M)
# }
Run the code above in your browser using DataLab