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()); }
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()); }