Exemplo n.º 1
0
        public void PopulateMatrixWithNumbers(WayOfPopulatingData wayOfPopulatingData)
        {
            Action <int[, ], int, int> populate = wayOfPopulatingData switch
            {
                WayOfPopulatingData.Column => this.PopulateByColumn,
                _ => this.PopulateByRow
            };

            for (int i = 0; i < this.size; i++)
            {
                for (int j = 0; j < this.size; j++)
                {
                    populate.Invoke(this.matrix, i, j);
                }
            }
        }
Exemplo n.º 2
0
 public Settings(int size, WayOfPopulatingData wayOfPopulatingData, Type matrixType)
 {
     this.MatrixSize          = size;
     this.WayOfPopulatingData = wayOfPopulatingData;
     this.MatrixType          = matrixType;
 }
Exemplo n.º 3
0
 public void PopulateMatrixWithNumbers(WayOfPopulatingData wayOfPopulatingData)
 {
     throw new NotImplementedException();
 }