public static List <double> ToSolve(double[,] matrix) { List <double> arrayMinValue = FindMaxValue.InRows(matrix); arrayMinValue.Add(arrayMinValue.Max()); int index = arrayMinValue.IndexOf(arrayMinValue.Max()); arrayMinValue.Add(++index); return(arrayMinValue); }
public static List <double> ToSolve(double y, double[,] matrix) { List <double> arrayMinValue = FindMinValue.InRows(matrix); List <double> arrayMaxValue = FindMaxValue.InRows(matrix); List <double> result = new List <double>(); for (int i = 0; i < arrayMinValue.Count; i++) { double resultS = y * arrayMinValue[i] + (1 - y) * arrayMaxValue[i]; result.Add(resultS); } double index = result.IndexOf(result.Max()); result.Add(result.Max()); result.Add(++index); return(result); }
public static List <double> ToSolve(double[,] matrix) { List <double> arrayMaxValue = FindMaxValue.InColumns(matrix); int counter = 0; for (int i = 0; i < matrix.GetLength(1); i++) { for (int j = 0; j < matrix.GetLength(0); j++) { matrix[j, i] = arrayMaxValue[counter] - matrix[j, i]; } counter++; } List <double> arrayResultMaxValue = FindMaxValue.InRows(matrix); arrayResultMaxValue.Add(arrayResultMaxValue.Min()); double index = arrayResultMaxValue.IndexOf(arrayResultMaxValue.Min()); arrayResultMaxValue.Add(++index); return(arrayResultMaxValue); }