public void SetData()
        {
            primes = new Primes(sides);

            for (int y = 1; y <= sides / 8; y++)
            {
                for (int x = y + 1; x <= sides / 8; x++)
                {
                    if (primes.IsReducable(x, y))
                    {
                        continue;
                    }
                    segments.Add(new Segment(x, y));
                }
            }

            minArea = 10000000000D;
        }
        public void SetData()
        {
            primes = new Primes(sides);
            List <Segment> segments = new List <Segment>();

            segments.Add(new Segment(1, 1));

            for (int y = 1; y <= sides / 8; y++)
            {
                for (int x = y + 1; x <= sides / 8; x++)
                {
                    if (primes.IsReducable(x, y))
                    {
                        continue;
                    }
                    segments.Add(new Segment(x, y));
                    segments.Add(new Segment(y, x));
                }
            }

            segments.Sort(new SegmentSort_Length());

            // Build base segments
            int j = 0;

            baseSegments = new Segment[baseSegmentCount];
            while (j < baseSegmentCount)
            {
                baseSegments[j] = new Segment(segments[j].points.Item1, segments[j].points.Item2);
                j++;
            }

            // build auxillary segments
            var auxSegList = new List <Segment>();

            while (segments[j].length < segments[(sides / 4)].length * maxSegmentToConsider)
            {
                auxSegList.Add(new Segment(segments[j].points.Item1, segments[j].points.Item2));
                j++;
            }
            auxillarySegments = auxSegList.ToArray();
        }