Exemple #1
0
        public virtual Int32[] GenerateIntegers(int length)
        {
            bool[] result = new bool[length * 32];

            for (int i = 0; i < result.Length; i++)
            {
                result[i] = GenerateOneBit();
                NextStep();
            }

            return(SeriesConverter.BoolToInt32(result));
        }
Exemple #2
0
        public virtual char[] GenerateBitsAsChars(int length)
        {
            char[] result = new char[length];

            for (int i = 0; i < length; i++)
            {
                result[i] = SeriesConverter.BoolToChar(GenerateOneBit());
                NextStep();
            }

            return(result);
        }
Exemple #3
0
        public virtual byte[] GenerateBytes(int length)
        {
            bool[] result = new bool[length * 8];

            for (int i = 0; i < result.Length; i++)
            {
                result[i] = GenerateOneBit();
                NextStep();
            }

            return(SeriesConverter.BoolToByteArray(result));
        }