Unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@888685 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b910285857
commit
a97a14915d
|
@ -112,7 +112,7 @@ public class GeneticAlgorithmTestPermutations {
|
||||||
int res = 0;
|
int res = 0;
|
||||||
List<Integer> decoded = decode(sequence);
|
List<Integer> decoded = decode(sequence);
|
||||||
for (int i=0; i<decoded.size(); i++) {
|
for (int i=0; i<decoded.size(); i++) {
|
||||||
int value = (Integer) decoded.get(i);
|
int value = decoded.get(i);
|
||||||
if (value != i) {
|
if (value != i) {
|
||||||
// bad position found
|
// bad position found
|
||||||
res += Math.abs(value - i);
|
res += Math.abs(value - i);
|
||||||
|
|
|
@ -980,8 +980,8 @@ public final class BlockRealMatrixTest extends TestCase {
|
||||||
|
|
||||||
public void testEqualsAndHashCode() {
|
public void testEqualsAndHashCode() {
|
||||||
BlockRealMatrix m = new BlockRealMatrix(testData);
|
BlockRealMatrix m = new BlockRealMatrix(testData);
|
||||||
BlockRealMatrix m1 = (BlockRealMatrix) m.copy();
|
BlockRealMatrix m1 = m.copy();
|
||||||
BlockRealMatrix mt = (BlockRealMatrix) m.transpose();
|
BlockRealMatrix mt = m.transpose();
|
||||||
assertTrue(m.hashCode() != mt.hashCode());
|
assertTrue(m.hashCode() != mt.hashCode());
|
||||||
assertEquals(m.hashCode(), m1.hashCode());
|
assertEquals(m.hashCode(), m1.hashCode());
|
||||||
assertEquals(m, m);
|
assertEquals(m, m);
|
||||||
|
|
|
@ -542,7 +542,7 @@ public final class SparseRealMatrixTest extends TestCase {
|
||||||
|
|
||||||
public void testEqualsAndHashCode() {
|
public void testEqualsAndHashCode() {
|
||||||
OpenMapRealMatrix m = createSparseMatrix(testData);
|
OpenMapRealMatrix m = createSparseMatrix(testData);
|
||||||
OpenMapRealMatrix m1 = (OpenMapRealMatrix) m.copy();
|
OpenMapRealMatrix m1 = m.copy();
|
||||||
OpenMapRealMatrix mt = (OpenMapRealMatrix) m.transpose();
|
OpenMapRealMatrix mt = (OpenMapRealMatrix) m.transpose();
|
||||||
assertTrue(m.hashCode() != mt.hashCode());
|
assertTrue(m.hashCode() != mt.hashCode());
|
||||||
assertEquals(m.hashCode(), m1.hashCode());
|
assertEquals(m.hashCode(), m1.hashCode());
|
||||||
|
|
Loading…
Reference in New Issue