add minmaxcut func,which is tested using testminmaxcut.m