private void CheckF()
        {
            if (setF1 != setF2)
            {
                return;
            }

            ParetoPointGeneration gen = new ParetoPointGeneration();

            for (int i = 0; i < F1.Length; i++)
            {
                gen.Points.Add(new MyPoint(F1[i], F2[i]));
            }

            // pareto
            uint[] indicies = ParetoFrontFinder.FindParetoFront(F1, F2);
            ParetoIncidies = indicies.Select(n => (int)n).ToArray();
            ParetoFront.Clear();
            for (int i = 0; i < indicies.Length; i++)
            {
                ParetoFront.Add(new Point(F1[indicies[i]], F2[indicies[i]]));
            }

            // calc colors
            Generations.Add(gen);
            if (Generations.Count > maxGen)
            {
                Generations.RemoveAt(0);
            }

            for (int i = 0; i < Generations.Count; i++)
            {
                byte c = (byte)(255 - ((double)i + 1) / Generations.Count * 255);
                Generations[i].Color = new SolidColorBrush(Color.FromArgb(255, c, c, c));
                Generations[i].Size  = i == Generations.Count - 1 ? 8 : 4;
            }

            RecalculateScale();

            if (!Generations.Any())
            {
                return;
            }
            if (!Generations.Last().Points.Any())
            {
                return;
            }
            if (SelectedIndex >= Generations.Last().Points.Count)
            {
                return;
            }
            SelectedPoint = Generations.Last().Points[SelectedIndex];
        }