diff --git a/src/main/java/org/jblas/FloatFunction.java b/src/main/java/org/jblas/FloatFunction.java index 91f6a889..ac64559d 100644 --- a/src/main/java/org/jblas/FloatFunction.java +++ b/src/main/java/org/jblas/FloatFunction.java @@ -39,7 +39,8 @@ /** * Represents a function on floats. */ -public interface FloatFunction { +public interface FloatFunction +{ /** Compute the function. */ public float compute(float x); } \ No newline at end of file diff --git a/src/main/java/org/jblas/Geometry.java b/src/main/java/org/jblas/Geometry.java index ed68408b..7bdf91d7 100644 --- a/src/main/java/org/jblas/Geometry.java +++ b/src/main/java/org/jblas/Geometry.java @@ -74,7 +74,7 @@ public static DoubleMatrix center(DoubleMatrix x) { /** Center the rows of a matrix (in-place). */ public static DoubleMatrix centerRows(DoubleMatrix x) { DoubleMatrix temp = new DoubleMatrix(x.columns); - for (int r = 0; r < x.rows; r++) + for (r: x.rows) x.putRow(r, center(x.getRow(r, temp))); return x; } @@ -82,7 +82,7 @@ public static DoubleMatrix centerRows(DoubleMatrix x) { /** Center the columns of a matrix (in-place). */ public static DoubleMatrix centerColumns(DoubleMatrix x) { DoubleMatrix temp = new DoubleMatrix(x.rows); - for (int c = 0; c < x.columns; c++) + for (c : x.columns) x.putColumn(c, center(x.getColumn(c, temp))); return x; }