public void min_max_test()
        {
            uint[] test_values_1 = { 15, 64, 19, 7, 0, 75, 73, 97, 41, 17 }; // 9,73
              uint[] test_values_2 = { 33, 6, 97, 24, 81, 85, 53, 49, 34, 100, 95, 23, 47, 31, 14, 57, 94, 17, 82, 7, 37, 64, 4, 83, 52 }; //20,82
              uint[] test_values_3 = { 0, 100 }; // 0,100
              uint[] test_values_4 = { }; // CONST.MAX_SIG_STR,0
              uint[] test_values_5 = { 5, 5, 5}; // 5,5
              uint[] test_values_6 = { 0, 100, 100, 100, 100 }; // 40,100
              uint[] test_values_7 = { 0, 0, 0, 0, 100 }; // 0,60

              List<uint> test_values = new List<uint>();
              MinMaxSignalStrength min_max = new MinMaxSignalStrength();

              test_values.AddRange(test_values_1);
              MinMax expected_min_max = new MinMax(9,73);
              MinMax actual_min_max = min_max.calculate_min_max_signal_strength(test_values) ;
              Specify.That(actual_min_max.ToString()).ShouldEqual(expected_min_max.ToString());

              test_values.Clear();
              test_values.AddRange(test_values_2);
              expected_min_max.min = 20;
              expected_min_max.max = 82;
              actual_min_max = min_max.calculate_min_max_signal_strength(test_values);
              Specify.That(actual_min_max.ToString()).ShouldEqual(expected_min_max.ToString());

              test_values.Clear();
              test_values.AddRange(test_values_3);
              expected_min_max.min = 0;
              expected_min_max.max = 100;
              actual_min_max = min_max.calculate_min_max_signal_strength(test_values);
              Specify.That(actual_min_max.ToString()).ShouldEqual(expected_min_max.ToString());

              test_values.Clear();
              test_values.AddRange(test_values_4);
              expected_min_max.min = Constant.MAX_SIG_STR;
              expected_min_max.max = 0;
              actual_min_max = min_max.calculate_min_max_signal_strength(test_values);
              Specify.That(actual_min_max.ToString()).ShouldEqual(expected_min_max.ToString());

              test_values.Clear();
              test_values.AddRange(test_values_5);
              expected_min_max.min = 5;
              expected_min_max.max = 5;
              actual_min_max = min_max.calculate_min_max_signal_strength(test_values);
              Specify.That(actual_min_max.ToString()).ShouldEqual(expected_min_max.ToString());

              test_values.Clear();
              test_values.AddRange(test_values_6);
              expected_min_max.min = 40;
              expected_min_max.max = 100;
              actual_min_max = min_max.calculate_min_max_signal_strength(test_values);
              Specify.That(actual_min_max.ToString()).ShouldEqual(expected_min_max.ToString());

              test_values.Clear();
              test_values.AddRange(test_values_7);
              expected_min_max.min = 0;
              expected_min_max.max = 60;
              actual_min_max = min_max.calculate_min_max_signal_strength(test_values);
              Specify.That(actual_min_max.ToString()).ShouldEqual(expected_min_max.ToString());
        }
        public MinMax calculate_min_max_signal_strength(List<uint> signal_strengths)
        {
            MinMax min_max = new MinMax(0, 0);
              if (signal_strengths == null || signal_strengths.Count == 0)
              {
            min_max.min = Constant.MAX_SIG_STR;
            return min_max;
              }
              int min, max;
              uint num_signal_strengths = (uint)signal_strengths.Count;
              uint sum = sum_uint_list(signal_strengths);
              double average = divide(sum, num_signal_strengths);
              double standard_deviation = std_dev(average, signal_strengths);
              min = (int)Math.Round(average - standard_deviation);
              max = (int)Math.Round(average + standard_deviation);
              if (max > Constant.MAX_SIG_STR)
              {
            min_max.max = Constant.MAX_SIG_STR;
              }
              else
              {
            min_max.max = (uint)max;
              }
              if (min < Constant.MIN_SIG_STR)
              {
            min_max.min = Constant.MIN_SIG_STR;
              }
              else
              {
            min_max.min = (uint)min;
              }

              return min_max;
        }