예제 #1
0
        static void Main(string[] args)
        {
            var ranges = new List <Range <string> >
            {
                new StringRange("W", 5, 8),
                new StringRange("S", 1, 4),
                new StringRange("L", 2, 6),
                new StringRange("X", 9, 20),
                new StringRange("T", 21, 30)
            };


            var finder = new OverlappingRangeFinder();

            c4(ranges);

            var results = finder.FindOverlaps(ranges).ToList();



            foreach (var result in results)
            {
                Console.WriteLine("{0} overlaps with: {1}", result.Range, string.Join(", ", result.OverlappingRanges.Select(r => r)));
            }
        }
예제 #2
0
        static void c4(IEnumerable <IRange> ranges)
        {
            var finder = new OverlappingRangeFinder();


            var results = finder.FindOverlaps(ranges);
        }