using System; using System.Collections.Generic; using Priority_Queue; namespace TMI_practicum { public static class SweepLineAlgorithm { public static IEnumerable Solve(IList circles) { // fuck deze priority queue piece of shit.... >:( SimplePriorityQueue events = new SimplePriorityQueue(); Stack intersections = new Stack(); var segments = new List(); foreach (var circle in circles) { events.Enqueue(new Event(Event.EventType.Start, circle.X - circle.R), circle.X - circle.R); events.Enqueue(new Event(Event.EventType.End, circle.X + circle.R), circle.X + circle.R); } return null; } private struct Event { public EventType Type { get; } public double X { get; } public enum EventType { Start, End, Intersect } public Event(EventType type, double xCoordinate) { Type = type; X = xCoordinate; } } private struct Segment { public SegmentType Type { get; } public Circle Circle { get; } public enum SegmentType { Top, Bottom } public Segment(Circle circle, SegmentType type) { Circle = circle; Type = type; } } } }