示例#1
0
        public static int[,] GetMatrix(int[,] matrix, string st)
        {
            List <AuxiliaryType> list = new List <AuxiliaryType>();

            for (int i = 0; i < matrix.GetLength(0); i++)
            {
                int sum = 0;
                for (int j = 0; j < matrix.GetLength(1); j++)
                {
                    sum += matrix[i, j];
                }
                list.Add(new AuxiliaryType {
                    Value = sum, Index = i
                });
            }
            Bubble.Get(list, st);
            return(Matrix.Get(list, matrix));
        }
示例#2
0
        public static void Get(int[,] matrix)
        {
            List <AuxiliaryType> list = new List <AuxiliaryType>();

            for (int i = 0; i < matrix.GetLength(0); i++)
            {
                int min = int.MaxValue;
                for (int j = 0; j < matrix.GetLength(1); j++)
                {
                    if (min > matrix[i, j])
                    {
                        min = matrix[i, j];
                    }
                }
                list.Add(new AuxiliaryType {
                    Value = min, Index = i
                });
            }
            Bubble.Get(list);
            Result.Show(list, matrix);
        }
示例#3
0
        public static int[,] GetMatrix(int[,] matrix, string st)
        {
            List <AuxiliaryType> list = new List <AuxiliaryType>();

            for (int i = 0; i < matrix.GetLength(0); i++)
            {
                int min = int.MaxValue;
                for (int j = 0; j < matrix.GetLength(1); j++)
                {
                    if (min > matrix[i, j])
                    {
                        min = matrix[i, j];
                    }
                }
                list.Add(new AuxiliaryType {
                    Value = min, Index = i
                });
            }
            Bubble.Get(list, st);
            return(Matrix.Get(list, matrix));
        }