示例#1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            encodeResultTxt.Text = "Kod: ";

            Golomb g      = new Golomb(Convert.ToDecimal(numberTxt.Text), Convert.ToDecimal(rangeTxt.Text));
            string result = g.Encode();

            encodeResultTxt.Text += result;
        }
示例#2
0
        public void LengthStatistics(decimal x, int y1, int y2)
        {
            ObservableCollection <KeyValuePair <string, int> > lengthCoding = new ObservableCollection <KeyValuePair <string, int> >();

            for (int i = y1; i <= y2; i++)
            {
                Golomb g      = new Golomb(x, i);
                string result = g.Encode();

                lengthCoding.Add(new KeyValuePair <string, int>(i.ToString(), result.Length));
            }

            ShowChart(lengthCoding);
        }