Beispiel #1
0
 public ErrorTypeSingle(WindowsWork.ErrorPassHolder param)
 {
     InitializeComponent();
     parameters = param;
     parameters.SetParams(new Dictionary <string, double>()
     {
         ["SingleError"] = Double.Parse(ProbError.Text.Replace(',', '.'), CultureInfo.InvariantCulture), ["Noise"] = Double.Parse(Noise.Text.Replace(',', '.'), CultureInfo.InvariantCulture), ["typeSingle"] = Double.Parse(((ProbCheck.IsChecked == true) ? "1.0" : "0.0").Replace(',', '.'), CultureInfo.InvariantCulture)
     });
 }
Beispiel #2
0
        public ChannelModel()
        {
            InitializeComponent();
            parameters = new WindowsWork.ErrorPassHolder();
            ErrorTypeSingle errWin  = new ErrorTypeSingle(parameters);
            ErrorTypePacket errWin2 = new ErrorTypePacket(parameters);

            errWin.Close();
            errWin2.Close();
            ErrSingleRadio.IsChecked = true;
        }
Beispiel #3
0
        public ErrorTypePacket(WindowsWork.ErrorPassHolder param)
        {
            InitializeComponent();
            parameters = param;

            Dictionary <string, double> buf = new Dictionary <string, double>(12);

            buf.Add("PacketError", float.Parse((string)ErrPacket.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            buf.Add("ErrorLambda", Double.Parse(ErrBetweenPacket.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            buf.Add("p1", Double.Parse(p1.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            buf.Add("p2", Double.Parse(p2.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            buf.Add("p3", Double.Parse(p3.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            buf.Add("h1", Double.Parse(h1.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            buf.Add("h2", Double.Parse(h2.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            buf.Add("q1", Double.Parse(q1.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            buf.Add("q2", Double.Parse(q2.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            buf.Add("q3", Double.Parse(q3.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            buf.Add("r1", Double.Parse(r1.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            buf.Add("r2", Double.Parse(r2.Text.Replace(',', '.'), CultureInfo.InvariantCulture));
            parameters.SetParams(buf);
        }