<commit_before>﻿using System.Collections.Generic;

namespace SomaSim.Math
{
    /// <summary>
    /// Interface for random number generators
    /// </summary>
    public interface IRandom
    {
        /// <summary>
        /// Initializes the random number generator with an unsigned int seed.
        /// </summary>
        /// <param name="seed"></param>
        void Init (uint seed);

        /// <summary>
        /// Generates the next random value as an unsigned int
        /// </summary>
        /// <returns></returns>
        uint Generate ();

        /// <summary>
        /// Generates the next random value as a single-precision float in the half-open range [0, 1).
        /// </summary>
        /// <returns></returns>
        float GenerateFloat ();
    }

    /// <summary>
    /// Simple data structure that encapsulates both a range of numbers for a random number generator,
    /// and the number of passes (one pass to generate a uniform distribution, more passes to
    /// approximate normal distribution).
    /// </summary>
    public class RandomRange
    {
        public int from;
        public int to;
        public byte passes;

        public RandomRange (int from = 0, int to = 1, byte passes = 1) {
            this.from = from;
            this.to = to;
            this.passes = passes;
        }
    }

    /// <summary>
    /// Extension methods for random number generators
    /// </summary>
    public static class RandomExtensions
    {
        /// <summary>
        /// Generates the next random value in the half-open range [min, max)
        /// </summary>
        /// <param name="rand"></param>
        /// <param name="min"></param>
        /// <param name="max"></param>
        /// <returns></returns><commit_msg>Constructor tweakery<commit_after>﻿using System.Collections.Generic;

namespace SomaSim.Math
{
    /// <summary>
    /// Interface for random number generators
    /// </summary>
    public interface IRandom
    {
        /// <summary>
        /// Initializes the random number generator with an unsigned int seed.
        /// </summary>
        /// <param name="seed"></param>
        void Init (uint seed);

        /// <summary>
        /// Generates the next random value as an unsigned int
        /// </summary>
        /// <returns></returns>
        uint Generate ();

        /// <summary>
        /// Generates the next random value as a single-precision float in the half-open range [0, 1).
        /// </summary>
        /// <returns></returns>
        float GenerateFloat ();
    }

    /// <summary>
    /// Simple data structure that encapsulates both a range of numbers for a random number generator,
    /// and the number of passes (one pass to generate a uniform distribution, more passes to
    /// approximate normal distribution).
    /// </summary>
    public class RandomRange
    {
        public int from;
        public int to;
        public byte passes;

        public RandomRange () : this(0, 1, 1) { }

        public RandomRange (int from, int to, byte passes = 1) {
            this.from = from;
            this.to = to;
            this.passes = passes;
        }
    }

    /// <summary>
    /// Extension methods for random number generators
    /// </summary>
    public static class RandomExtensions
    {
        /// <summary>
        /// Generates the next random value in the half-open range [min, max)
        /// </summary>
        /// <param name="rand"></param>
        /// <param name="min"></param>
        /// <param name="max"></param>
        /// <returns></returns>
{'fraction_non_alphanumeric': 0.13134411600669268, 'fraction_numerical': 0.003067484662576687, 'mean_word_length': 1.6969924812030075, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5179031', 'n_tokens_mistral': 919, 'n_tokens_neox': 888, 'n_words': 327}