Class Matrix.Init.Uniform

  • Enclosing class:
    Matrix.Init

    public static class Matrix.Init.Uniform
    extends Matrix.Init
    Generate a uniform range of random numbers to fill the matrix.

    The uniform will be centered around center, extending for range in either direction.

    • Constructor Detail

      • Uniform

        public Uniform​(double center,
                       double range)
        Create a new class.
        Parameters:
        center - center of the uniform
        range - range in either direction
      • Uniform

        public Uniform​(double range)
        Create a new class.
        Parameters:
        range - range in either direction
    • Method Detail

      • apply

        public void apply​(Matrix m)
        Description copied from class: Matrix.Init
        Apply the initialization (in place) to a new matrix.
        Specified by:
        apply in class Matrix.Init
        Parameters:
        m - the matrix