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:
Thomas Neidhart 2013-12-08 18:23:44 +00:00
parent d944333d01
commit 7573e9eec0
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ public abstract class Chromosome implements Comparable<Chromosome>,Fitness {
* </ul>
*/
public int compareTo(final Chromosome another) {
return ((Double)this.getFitness()).compareTo(another.getFitness());
return Double.compare(getFitness(), another.getFitness());
}
/**