示例#1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            double min;
            string str;

            matrix  = new LossMatrix();
            minimax = new Minimax(matrix);
            minimaxGrid.ItemsSource = minimax.FindDecision(out str, out min);
            minimaxLable.Content    = "Минимаксный критерий: " + str + ": " + min;
        }
示例#2
0
        private void GetData()
        {
            sourceMatrix = new List <TableLossMatrix>();
            string str = "";

            str = tbSNume.Text + tbName.Text;

            if (str.Length % 2 == 0)
            {
                row = str.Length / column;
            }
            else
            {
                str += "И";
                row  = str.Length / column;
            }

            matrix = new LossMatrix(row, column);

            data = new double[LossMatrix.RowCount, LossMatrix.ColumnCount];

            int strStep = 0;
            int temp;

            for (int i = 0; i < LossMatrix.RowCount; i++)
            {
                for (int j = 0; j < LossMatrix.ColumnCount; j++)
                {
                    if ((alphabet.GetNumber(str[strStep]).ToString().Length == 2))
                    {
                        data[i, j] = ((alphabet.GetNumber(str[strStep])) % 10);
                    }
                    else
                    {
                        data[i, j] = alphabet.GetNumber(str[strStep]);
                    }
                    data[i, j] /= 10;
                    strStep++;
                }
                temp = i;
                sourceMatrix.Add(new TableLossMatrix("α" + ++temp, data[i, 0], data[i, 1]));
            }

            matrix.Matrix = data;
            gridSourceMatrix.ItemsSource = sourceMatrix;
        }
示例#3
0
        /////////////////////////

        public HurwiczCriterion(LossMatrix matrix)
        {
            this.matrix = matrix.Matrix;
        }
示例#4
0
 public Minimax(LossMatrix matrix)
 {
     this.matrix = matrix.Matrix;
 }