public override int Compare(CRegion crg1, CRegion crg2) { int intResult = CCmpMethods.CmpDbl_ConstVerySmall(crg1.dblCostExact, crg2.dblCostExact); //int intResult = crg1.dblCostExact.CompareTo(crg2.dblCostExact); if (intResult == 0) { intResult = CCmpMethods.CmpCrg_CphGIDTypeIndex(crg1, crg2); } return(intResult); }
public override int Compare(CPatch cph1, CPatch cph2) { int intResult = CCmpMethods.CmpDbl_ConstVerySmall(cph1.dblComp, cph2.dblComp); //int intResult = cph1.dblComp.CompareTo(cph2.dblComp); if (intResult == 0) { intResult = cph1.GID.CompareTo(cph2.GID); } return(intResult); }
public override int Compare(IList <object> lt1, IList <object> lt2) { int intResult = CCmpMethods.CmpDbl_ConstVerySmall (Convert.ToDouble(lt1[3]), Convert.ToDouble(lt2[3])); //overesimation factor if (intResult == 0) { intResult = CCmpMethods.CmpDbl_ConstVerySmall (Convert.ToDouble(lt1[1]), Convert.ToDouble(lt2[1])); //patch number } if (intResult == 0) { intResult = CCmpMethods.CmpDbl_ConstVerySmall (Convert.ToDouble(lt1[2]), Convert.ToDouble(lt2[2])); //adjacency number } if (intResult == 0) { intResult = CCmpMethods.CmpDbl_ConstVerySmall (Convert.ToDouble(lt1[0]), Convert.ToDouble(lt2[0])); //domain id } return(-intResult); }