}
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]);
return result;
}
+ /**
+ * mirrors columns of the matrix
+ *
+ * @return
+ */
+ @Override
+ public MatrixI mirrorCol()
+ {
+ double[][] result = new double[rows][cols];
+ for (int i = 0; i < rows; i++)
+ {
+ int k = cols - 1; // reverse col
+ for (int j = 0; j < cols; j++)
+ {
+ result[i][k--] = this.getValue(i,j);
+ }
+ }
+ MatrixI resultMatrix = new Matrix(result);
+ if (d != null)
+ resultMatrix.setD(d);
+ if (e != null)
+ resultMatrix.setE(e);
+
+ return resultMatrix;
+ }
}