Пример #1
0
        /// <summary>
        /// Create a random array of doubles in the half-open interval
        /// [0.0, 1.0) of the specified length.
        /// </summary>
        public static double[] CreateUniformDoubleArray(
            this IRandomUniform rnd, long length)
        {
            var array = new double[length];

            rnd.FillUniform(array);
            return(array);
        }
Пример #2
0
        /// <summary>
        /// Create a random array of floats in the half-open interval
        /// [0.0, 1.0) of the specified length.
        /// </summary>
        public static float[] CreateUniformFloatArray(
            this IRandomUniform rnd, long length)
        {
            var array = new float[length];

            rnd.FillUniform(array);
            return(array);
        }