diff options
Diffstat (limited to 'nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/BCHComparator.java')
-rw-r--r-- | nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/BCHComparator.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/BCHComparator.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/BCHComparator.java index 66c25ed0b73d..74fd1b8481fe 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/BCHComparator.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/BCHComparator.java @@ -28,17 +28,18 @@ package net.adaptivebox.goodness; public class BCHComparator implements IGoodnessCompareEngine { -/* check the magnitude of two array, the frontal is more important - **/ + /* + * check the magnitude of two array, the frontal is more important + **/ private static int compareArray(double[] fit1, double[] fit2) { - for (int i=0; i<fit1.length; i++) { - if (fit1[i]>fit2[i]) { - return LARGER_THAN; //Large than - } else if (fit1[i]<fit2[i]){ - return LESS_THAN; //Less than + for (int i = 0; i < fit1.length; i++) { + if (fit1[i] > fit2[i]) { + return LARGER_THAN; // Large than + } else if (fit1[i] < fit2[i]) { + return LESS_THAN; // Less than } } - return IGoodnessCompareEngine.EQUAL_TO; //same + return IGoodnessCompareEngine.EQUAL_TO; // same } public int compare(double[] fit1, double[] fit2) { |