@Test public void testUniformView() { Matrix m1 = Matrices.uniformView(5, 6, 1234); Matrix m2 = Matrices.uniformView(5, 6, 1234); for (int row = 0; row < m1.numRows(); row++) { for (int col = 0; col < m1.numCols(); col++) { assertTrue(m1.getQuick(row, col) >= 0.0); assertTrue(m1.getQuick(row, col) < 1.0); } } Matrix diff = m1.minus(m2); assertEquals(0, diff.aggregate(Functions.PLUS, Functions.ABS), 1e-10); }
public static final Matrix uniformView(final int rows, final int columns, int seed) { return functionalMatrixView(rows, columns, uniformGenerator(seed), true); }
Matrices { public static final Matrix uniformView(final int rows, final int columns, int seed) { return functionalMatrixView(rows, columns, uniformGenerator(seed), true); } }
Matrices { public static final Matrix uniformView(final int rows, final int columns, int seed) { return functionalMatrixView(rows, columns, uniformGenerator(seed), true); }  }
Matrices { public static final Matrix uniformView(final int rows, final int columns, int seed) { return functionalMatrixView(rows, columns, uniformGenerator(seed), true); }  static final Matrix functionalMatrixView(final int rows,
                                                  final int columns,
                                                  final IntIntFunction gf,
                                                  final boolean denseLike); static final Matrix functionalMatrixView(final int rows,
                                                  final int columns,
                                                  final IntIntFunction gf); static final Matrix transposedView(final Matrix m); static final Matrix gaussianView(final int rows,
                                          final int columns,
                                          long seed); static final Matrix symmetricUniformView(final int rows,
                                                  final int columns,
                                                  int seed); static final Matrix uniformView(final int rows,
                                         final int columns,
                                         int seed); static final IntIntFunction gaussianGenerator(final long seed); static final IntIntFunction uniformSymmetricGenerator(final int seed); static final IntIntFunction uniformGenerator(final int seed); }
Matrices { public static final Matrix uniformView(final int rows, final int columns, int seed) { return functionalMatrixView(rows, columns, uniformGenerator(seed), true); }  static final Matrix functionalMatrixView(final int rows,
                                                  final int columns,
                                                  final IntIntFunction gf,
                                                  final boolean denseLike); static final Matrix functionalMatrixView(final int rows,
                                                  final int columns,
                                                  final IntIntFunction gf); static final Matrix transposedView(final Matrix m); static final Matrix gaussianView(final int rows,
                                          final int columns,
                                          long seed); static final Matrix symmetricUniformView(final int rows,
                                                  final int columns,
                                                  int seed); static final Matrix uniformView(final int rows,
                                         final int columns,
                                         int seed); static final IntIntFunction gaussianGenerator(final long seed); static final IntIntFunction uniformSymmetricGenerator(final int seed); static final IntIntFunction uniformGenerator(final int seed);  }