Small performance improvement.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1549094 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d944333d01
commit
7573e9eec0
|
@ -59,7 +59,7 @@ public abstract class Chromosome implements Comparable<Chromosome>,Fitness {
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public int compareTo(final Chromosome another) {
|
public int compareTo(final Chromosome another) {
|
||||||
return ((Double)this.getFitness()).compareTo(another.getFitness());
|
return Double.compare(getFitness(), another.getFitness());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue