1
1
using System ;
2
2
using System . Collections . Generic ;
3
3
using System . Linq ;
4
+ using Advanced . Algorithms . DataStructures ;
4
5
5
6
namespace Advanced . Algorithms . Geometry
6
7
{
@@ -15,11 +16,11 @@ public class BentleyOttmann
15
16
private HashSet < Event > verticalHorizontalLines ;
16
17
private HashSet < Event > normalLines ;
17
18
18
- private DataStructures . BMinHeap < Event > eventQueue ;
19
+ private BMinHeap < Event > eventQueue ;
19
20
private HashSet < Event > eventQueueLookUp ;
20
21
21
22
private Dictionary < Event , Event > rightLeftEventLookUp ;
22
- private DataStructures . RedBlackTree < Event > currentlyTrackedLines ;
23
+ private RedBlackTree < Event > currentlyTrackedLines ;
23
24
24
25
private Dictionary < Point , HashSet < Tuple < Event , Event > > > intersectionEvents ;
25
26
@@ -39,7 +40,7 @@ private void initialize(IEnumerable<Line> lineSegments)
39
40
{
40
41
SweepLine = new Line ( new Point ( 0 , 0 ) , new Point ( 0 , int . MaxValue ) , Tolerance ) ;
41
42
42
- currentlyTrackedLines = new DataStructures . RedBlackTree < Event > ( true , pointComparer ) ;
43
+ currentlyTrackedLines = new RedBlackTree < Event > ( true , pointComparer ) ;
43
44
intersectionEvents = new Dictionary < Point , HashSet < Tuple < Event , Event > > > ( pointComparer ) ;
44
45
45
46
verticalHorizontalLines = new HashSet < Event > ( ) ;
@@ -65,7 +66,7 @@ private void initialize(IEnumerable<Line> lineSegments)
65
66
x . Value
66
67
} ) , new PointComparer ( ) ) ;
67
68
68
- eventQueue = new DataStructures . BMinHeap < Event > ( eventQueueLookUp , new EventQueueComparer ( ) ) ;
69
+ eventQueue = new BMinHeap < Event > ( eventQueueLookUp , new EventQueueComparer ( ) ) ;
69
70
}
70
71
71
72
public Dictionary < Point , List < Line > > FindIntersections ( IEnumerable < Line > lineSegments )
0 commit comments