Esempio n. 1
0
        private byte[][] RandomPlacementOverInitialState(byte[][] initialMatrix)
        {
            byte[][] sample = initialMatrix.Rotate();

            for (int j = 0; j < this.Columns; j++)
            {
                int    numberOfOnes = this.desiredContainerInstanceCounts[j];
                byte[] array        = RandomBinary.GenerateRandomBinaryArray(sample[j], numberOfOnes);
                sample[j] = array;
            }

            return(sample.Rotate());
        }
Esempio n. 2
0
        private byte[][] GenerateSample()
        {
            byte[][] sample = new byte[this.Columns][];

            for (int j = 0; j < this.Columns; j++)
            {
                int    numberOfOnes = this.desiredContainerInstanceCounts[j];
                byte[] array        = RandomBinary.GenerateRandomBinaryArray(this.Rows, numberOfOnes);
                sample[j] = array;
            }

            return(sample.Rotate());
        }