# A perfect matching exists, and glover produces one.
left<-c(2,1,1,4,5)
right<-c(4,3,1,5,5)
glover(left,right)
# No perfect matching exists, and glover returns maximum matching ratio.
# Treated 4 and treated 5 can only be matched to control 5.
left<-c(2,1,1,5,5)
right<-c(4,3,1,5,5)
glover(left,right)
Run the code above in your browser using DataLab