}
else
{
- // System.out.println("Iteration " + iter);
+ // jalview.bin.Console.outPrintln("Iteration " + iter);
}
g = (d[l] - d[l - 1]) / (2.0 * e[l - 1]);
}
else
{
- // System.out.println("Iteration " + iter);
+ // jalview.bin.Console.outPrintln("Iteration " + iter);
}
g = (d[l] - d[l - 1]) / (2.0 * e[l - 1]);
e = v;
}
- @Override
- public int hashCode()
- {
- return (int) getTotal();
- }
-
public double getTotal()
{
double d = 0d;
return d;
}
+ /**
+ * {@inheritDoc}
+ */
@Override
- public boolean equals(Object obj)
+ public boolean equals(MatrixI m2, double delta)
{
- if (!(obj instanceof MatrixI))
- {
- return false;
- }
- MatrixI m2 = (MatrixI) obj;
- if (this.height() != m2.height() || this.width() != m2.width())
+ if (m2 == null || this.height() != m2.height()
+ || this.width() != m2.width())
{
return false;
}
{
for (int j = 0; j < this.width(); j++)
{
- if (this.getValue(i, j) != m2.getValue(i, j))
+ double diff = this.getValue(i, j) - m2.getValue(i, j);
+ if (Math.abs(diff) > delta)
{
return false;
}