LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
BeachLine.cxx
Go to the documentation of this file.
1 
8 // Framework Includes
9 
11 
12 // std includes
13 #include <iostream>
14 #include <limits>
15 #include <string>
16 
17 //------------------------------------------------------------------------------------------------------------------------------------------
18 // implementation follows
19 
20 namespace voronoi2d {
21 
22  BSTNode::BSTNode(IEvent* event, BSTNode* parent, BSTNode* leftChild, BSTNode* rightChild)
23  {
24  m_depth = 0;
25  m_event = event;
26  m_parent = parent;
27  m_leftChild = leftChild;
28  m_rightChild = rightChild;
29  m_predecessor = NULL;
30  m_successor = NULL;
31  m_associated = NULL;
32 
33  m_event->setBSTNode(this);
34 
35  // Reset depth
36  setDepth();
37  }
38 
40  {
41  if (m_leftChild && m_rightChild) {
42  int maxDepth = std::max(m_leftChild->getDepth(), m_rightChild->getDepth());
43 
44  m_depth = maxDepth + 1;
45  }
46  else
47  m_depth = 0;
48 
49  // If we change depth at this level then need to ripple it up through the tree
50  if (m_parent) m_parent->setDepth();
51 
52  return;
53  }
54 
56  {
57  // Find the insertion point for the new event
58  BSTNode* node = findBestLeaf(event, m_root);
59 
60  // Insert it
61  node = insertNewLeaf(event, node);
62 
63  // Now rebalance starting at this node
64  rebalance(node);
65 
66  // Check beach line integrity
67  // checkBeachLine(event->xPos() - 0.000001);
68 
69  return node;
70  }
71 
73  {
74  // Assumption: a leaf will have NULL child pointers so the idea is to
75  // follow the left or right child pointers until we get to a leaf
76  BSTNode* node = topNode;
77 
78  // A leaf is found when the node has no children
79  if (node && node->getLeftChild() && node->getRightChild()) {
80  // This node represents a breakpoint between two arcs and we can
81  // recover these immediately by getting the predecessor and successor leafs
82  BSTNode* rightLeaf = node->getSuccessor();
83  BSTNode* leftLeaf = node->getPredecessor();
84 
85  // Which path do we follow down the tree?
86  if (m_utilities.newSiteToLeft(event, leftLeaf->getEvent(), rightLeaf->getEvent()))
87  node = findBestLeaf(event, node->getLeftChild());
88  else
89  node = findBestLeaf(event, node->getRightChild());
90  }
91 
92  return node;
93  }
94 
96  {
97  // The idea of this function is to insert a new Site Event into the beach line
98  // where it is assumed that the input node is the matched arc into which we
99  // insert the new site event.
100  // The function then returns the new leaf created which represents the new arc
101 
102  // Have we found a null pointer?
103  if (node == NULL) {
104  m_nodeVec.push_back(BSTNode(event));
105  node = &m_nodeVec.back();
106  return node;
107  }
108 
109  // Check if a circle event had been definied for the node we are splitting,
110  // if so then we need to invalidate that circle event
111  if (node->getAssociated()) {
112  node->getAssociated()->getEvent()->setInvalid();
113  node->getAssociated()->setAssociated(NULL);
114  node->setAssociated(NULL);
115  }
116 
117  // Right now assume that the input node is the leaf at which we want to insert the new data
118  // For the beachline, this means we are inserting a new arc into the beachline by dividing the
119  // current arc. So we are going to replace the input leaf with a subtree having three leaves
120  // (two breakpoints)...
121  // Start by creating a node for the new arc
122  m_nodeVec.push_back(BSTNode(event)); // This will be the new site point
123 
124  BSTNode* newLeaf = &m_nodeVec.back();
125 
126  m_nodeVec.push_back(BSTNode(*node)); // This will be the new left leaf (the original arc)
127 
128  BSTNode* leftLeaf = &m_nodeVec.back();
129 
130  m_nodeVec.push_back(
131  BSTNode(event)); // This will be the breakpoint between the left and new leaves
132 
133  BSTNode* breakNode = &m_nodeVec.back();
134 
135  m_nodeVec.push_back(
136  BSTNode(event)); // Finally, this is the breakpoint between new and right leaves
137 
138  BSTNode* topNode = &m_nodeVec.back();
139 
140  // Set this to be the king of the local world
141  topNode->setParent(node->getParent());
142 
143  // Make sure the parent points to this new node
144  if (node->getParent()) {
145  if (node->getParent()->getLeftChild() == node)
146  node->getParent()->setLeftChild(topNode);
147  else
148  node->getParent()->setRightChild(topNode);
149  }
150  // But if there is no parent then the topnode is the new root
151  else
152  m_root = topNode;
153 
154  // Set our children
155  topNode->setLeftChild(breakNode);
156  topNode->setRightChild(node);
157 
158  // Original node is now child of the top node
159  node->setParent(topNode);
160 
161  // If there was an associated circle event to this node, invalidate it
162  if (node->getAssociated()) {
163  node->getAssociated()->setAssociated(NULL);
164  node->getAssociated()->getEvent()->setInvalid();
165  node->setAssociated(NULL);
166  leftLeaf->setAssociated(NULL);
167  }
168 
169  // Now set the parent and children of the left breakpoint node
170  breakNode->setParent(topNode);
171  breakNode->setLeftChild(leftLeaf);
172  breakNode->setRightChild(newLeaf);
173 
174  // Finally set the leaves parents
175  leftLeaf->setParent(breakNode);
176  newLeaf->setParent(breakNode);
177 
178  // Now we wire up traversal chain, going left to right
179  leftLeaf->setPredecessor(node->getPredecessor());
180  leftLeaf->setSuccessor(breakNode);
181 
182  if (node->getPredecessor()) node->getPredecessor()->setSuccessor(leftLeaf);
183 
184  breakNode->setPredecessor(leftLeaf);
185  breakNode->setSuccessor(newLeaf);
186 
187  newLeaf->setPredecessor(breakNode);
188  newLeaf->setSuccessor(topNode);
189 
190  topNode->setPredecessor(newLeaf);
191  topNode->setSuccessor(node);
192  node->setPredecessor(topNode);
193 
194  // Finally, reset the depths
195  // By definition the break node will have depth of 1
196  breakNode->setDepth();
197 
198  // Check the beachline integrity
199  checkBeachLine(newLeaf->getEvent()->xPos() - 0.00000001);
200 
201  return newLeaf;
202  }
203 
205  {
206  // The input node is assumed to be a leaf (arc) and is the disappearing arc
207  // between a leaf (arc) to the left and one to the right. There are breakpoints
208  // between the arcs.
209  // One of the intervening breakpoints is the parent of the leaf to remove
210  BSTNode* nodeParent = node->getParent();
211 
212  // parent of the parent
213  BSTNode* grandParent = nodeParent->getParent();
214 
215  // Parent is either left or right child, node is left or right child.... my brain is dizzy
216  BSTNode* sibling = nodeParent->getRightChild();
217 
218  if (node == sibling) sibling = nodeParent->getLeftChild();
219 
220  if (nodeParent == grandParent->getLeftChild())
221  grandParent->setLeftChild(sibling);
222  else
223  grandParent->setRightChild(sibling);
224 
225  sibling->setParent(grandParent);
226 
227  // Now we need to deal with the predecessor/successor chain.
228  // This should be straightforward, we are removing the middle arc and the immediate parent
229  // breakpoint with the grandparent becoming the new breakpoint. It should be that we simply
230  // set the left arc's successor, the right arc's predecessor and make sure the grandparent points
231  // to the right objects.
232  // Also note that if here there MUST be a left and right arc
233  BSTNode* arcLeft = node->getPredecessor()->getPredecessor();
234  BSTNode* arcRight = node->getSuccessor()->getSuccessor();
235 
236  // Note as well that any circle events for those arcs are now invalid
237  if (arcLeft->getAssociated()) {
238  arcLeft->getAssociated()->getEvent()->setInvalid();
239  arcLeft->getAssociated()->setAssociated(NULL);
240  arcLeft->setAssociated(NULL);
241  }
242 
243  if (arcRight->getAssociated()) {
244  arcRight->getAssociated()->getEvent()->setInvalid();
245  arcRight->getAssociated()->setAssociated(NULL);
246  arcRight->setAssociated(NULL);
247  }
248 
249  // Basically, we need to connect the left and right arcs to their common break point
250  // What breakpoint that is will be determined by weather the arc we are removing is a
251  // left or right child
252  if (node == nodeParent->getLeftChild()) {
253  // In this case, the right arc's predecessor becomes the node's predecessor
254  // The left arc is all set
255  arcRight->setPredecessor(node->getPredecessor());
256  node->getPredecessor()->setSuccessor(arcRight);
257  }
258  else {
259  // Here the left arc's successor is what needs to be changed
260  arcLeft->setSuccessor(node->getSuccessor());
261  node->getSuccessor()->setPredecessor(arcLeft);
262  }
263 
264  // zap the pointers for the removed nodes
265  node->setParent(NULL);
266  nodeParent->setLeftChild(NULL);
267  nodeParent->setRightChild(NULL);
268  nodeParent->setParent(NULL);
269  nodeParent->setSuccessor(NULL);
270  nodeParent->setPredecessor(NULL);
271  node->setSuccessor(NULL);
272  node->setPredecessor(NULL);
273  node->setHalfEdge(NULL);
274  node->setFace(NULL);
275 
276  // Reset the depth
277  grandParent->setDepth();
278 
279  // Check beach line integrity
280  // checkBeachLine(node->getAssociated()->getEvent()->xPos()-0.000001);
281 
282  // Rebalance
283  rebalance(grandParent);
284 
285  // Check beach line integrity
286  checkBeachLine(node->getAssociated()->getEvent()->xPos() - 0.00000001);
287 
288  // Return the new breakpoint
289  return arcLeft->getSuccessor();
290  }
291 
293  {
294  int nodeCount(0);
295 
296  countNodes(m_root, nodeCount);
297 
298  return nodeCount;
299  }
300 
302  {
303  int leafCount(0);
304 
305  countLeaves(m_root, leafCount);
306 
307  return leafCount;
308  }
309 
310  void BeachLine::countNodes(const BSTNode* node, int& nodeCount) const
311  {
312  if (node) {
313  if (node->getLeftChild()) countNodes(node->getLeftChild(), nodeCount);
314  if (node->getRightChild()) countNodes(node->getRightChild(), nodeCount);
315 
316  if ((node->getLeftChild() != NULL) != (node->getRightChild() != NULL)) {
317  std::cout << "****** Tree has one branch but not the other! *******" << std::endl;
318  }
319 
320  nodeCount++;
321  }
322 
323  return;
324  }
325 
326  void BeachLine::countLeaves(const BSTNode* node, int& leafCount) const
327  {
328  // If not a leaf then still have children to search
329  if (node->getLeftChild() && node->getRightChild()) {
330  countLeaves(node->getLeftChild(), leafCount);
331  countLeaves(node->getRightChild(), leafCount);
332  }
333  else
334  leafCount += 1;
335 
336  return;
337  }
338 
340  {
341  int leafCount(0);
342 
343  // Starting with the root, dive down until we find a leaf
344  BSTNode* node = m_root;
345 
346  // Basically, follow the left branch down until we have no more children
347  while (node->getLeftChild())
348  node = node->getLeftChild();
349 
350  // Note that construction we should be a leaf, now we traverse across
351  // the beach line in both directions to get the leaf count
352  if (node) {
353  leafCount += traverseBeachLeft(node->getPredecessor());
354  leafCount += traverseBeachRight(node->getSuccessor());
355 
356  // just to be sure...
357  if (!node->getLeftChild() && !node->getRightChild()) leafCount++;
358  }
359 
360  return leafCount;
361  }
362 
363  void BeachLine::checkBeachLine(double beachLine) const
364  {
365  // Starting with the root, dive down until we find the leftmost leaf
366  BSTNode* node = m_root;
367 
368  if (!node) return;
369 
370  // Basically, follow the left branch down until we have no more children
371  while (node->getLeftChild())
372  node = node->getLeftChild();
373 
374  // Keep track of breakpoints
375  double lastBreakPointY = -std::numeric_limits<double>::max();
376  int nBadCompares(0);
377  int nNodes(0);
378  int nBreakPoints(0);
379  int nLeaves(0);
380  BSTNode* lastBreakPoint(NULL);
381 
382  const double tolerance(1.e-5);
383 
384  // This is the start of the beach line, we now traverse across and and check status
385  // of each breakpoint's position
386  while (node->getSuccessor()) {
387  // Is this a breakpoint?
388  if (node->getLeftChild() && node->getRightChild()) {
389  RootsPair roots;
390  double breakPoint = m_utilities.computeBreak(
391  beachLine, node->getPredecessor()->getEvent(), node->getSuccessor()->getEvent(), roots);
392 
393  if (breakPoint + tolerance < lastBreakPointY) {
394  std::cout << " #####>> Beach line check gets bad breakpoint, last: " << lastBreakPointY
395  << ", new: " << breakPoint << ", roots: " << roots.first << "/" << roots.second
396  << std::endl;
397  std::cout << " Current left arc x,y: "
398  << node->getPredecessor()->getEvent()->xPos() << ", "
399  << node->getPredecessor()->getEvent()->yPos()
400  << ", right arc x,y: " << node->getSuccessor()->getEvent()->xPos() << ", "
401  << node->getSuccessor()->getEvent()->yPos() << ", beachLine: " << beachLine;
402  if (node->getPredecessor()->getAssociated())
403  std::cout << ", left: "
404  << node->getPredecessor()->getAssociated()->getEvent()->isValid();
405  if (node->getSuccessor()->getAssociated())
406  std::cout << ", right: "
407  << node->getSuccessor()->getAssociated()->getEvent()->isValid();
408  std::cout << std::endl;
409  if (lastBreakPoint) {
410  std::cout << " Previous left arc x,y: "
411  << lastBreakPoint->getPredecessor()->getEvent()->xPos() << ", "
412  << lastBreakPoint->getPredecessor()->getEvent()->yPos()
413  << ", right arc x,y: " << lastBreakPoint->getSuccessor()->getEvent()->xPos()
414  << ", " << lastBreakPoint->getSuccessor()->getEvent()->yPos();
415  if (lastBreakPoint->getPredecessor()->getAssociated())
416  std::cout << ", left: "
417  << lastBreakPoint->getPredecessor()->getAssociated()->getEvent()->isValid();
418  if (lastBreakPoint->getSuccessor()->getAssociated())
419  std::cout << ", right: "
420  << lastBreakPoint->getSuccessor()->getAssociated()->getEvent()->isValid();
421  std::cout << std::endl;
422  }
423  nBadCompares++;
424  }
425 
426  lastBreakPointY = breakPoint;
427  lastBreakPoint = node;
428  nBreakPoints++;
429  }
430  else {
431  // Confirm that the next leaf in the beachline is the next according to the tree
432  if (node->getSuccessor()) {
433  BSTNode* temp = node;
434  while (temp->getParent() && temp != temp->getParent()->getLeftChild())
435  temp = temp->getParent();
436  if (temp->getParent()) temp = temp->getParent()->getRightChild();
437  while (temp->getLeftChild())
438  temp = temp->getLeftChild();
439 
440  if (node->getSuccessor()->getSuccessor() != temp ||
441  node != temp->getPredecessor()->getPredecessor()) {
442  std::cout << " --> Successor tree/beach mismatch, leaf # " << nLeaves
443  << ", node: " << node << ", " << node->getEvent()->xPos() << "/"
444  << node->getEvent()->yPos() << ", s: " << node->getSuccessor()
445  << ", ss: " << node->getSuccessor()->getSuccessor() << std::endl;
446  std::cout << " temp: " << temp << ", " << temp->getEvent()->xPos() << "/"
447  << temp->getEvent()->yPos() << ", p: " << temp->getPredecessor()
448  << ", pp: " << temp->getPredecessor()->getPredecessor() << std::endl;
449  }
450  }
451 
452  if (node->getPredecessor()) {
453  BSTNode* temp = node;
454  while (temp->getParent() && temp != temp->getParent()->getRightChild())
455  temp = temp->getParent();
456  if (temp->getParent()) temp = temp->getParent()->getLeftChild();
457  while (temp->getRightChild())
458  temp = temp->getRightChild();
459 
460  if (node->getPredecessor()->getPredecessor() != temp ||
461  node != temp->getSuccessor()->getSuccessor()) {
462  std::cout << " --> Predecessor tree/beach mismatch, leaf # " << nLeaves
463  << ", node: " << node << ", " << node->getEvent()->xPos() << "/"
464  << node->getEvent()->yPos() << ", p: " << node->getPredecessor()
465  << ", pp: " << node->getPredecessor()->getPredecessor() << std::endl;
466  std::cout << " temp: " << temp << ", " << temp->getEvent()->xPos() << "/"
467  << temp->getEvent()->yPos() << ", s: " << temp->getSuccessor()
468  << ", ss: " << temp->getSuccessor()->getSuccessor() << std::endl;
469  }
470  }
471 
472  nLeaves++;
473  }
474 
475  nNodes++;
476 
477  node = node->getSuccessor();
478  }
479 
480  if (nBadCompares > 0)
481  std::cout << "=======>> Beach line check resulted in " << nBadCompares << " bad compares of "
482  << nBreakPoints << " break points checked, with " << nLeaves << " leaves"
483  << std::endl;
484 
485  // std::cout << "-------------------------------------------------------------------------------------------------------" << std::endl;
486 
487  return;
488  }
489 
491  {
492  int leafCount(0);
493 
494  if (node) {
495  // Keep traversing
496  if (node->getPredecessor()) leafCount += traverseBeachLeft(node->getPredecessor());
497 
498  // Are we also a leaf?
499  if (!node->getLeftChild() && !node->getRightChild()) leafCount++;
500  }
501 
502  return leafCount;
503  }
504 
506  {
507  int leafCount(0);
508 
509  if (node) {
510  // Keep traversing
511  if (node->getSuccessor()) leafCount += traverseBeachRight(node->getSuccessor());
512 
513  // Are we also a leaf?
514  if (!node->getLeftChild() && !node->getRightChild()) leafCount++;
515  }
516 
517  return leafCount;
518  }
519 
520  int BeachLine::getTreeDepth(const BSTNode* node) const
521  {
522  int depth(0);
523 
524  // Node exists and its not a leaf
525  if (node && node->getLeftChild() && node->getRightChild()) {
526  depth = std::max(getTreeDepth(node->getLeftChild()), getTreeDepth(node->getRightChild()));
527 
528  depth++;
529  }
530  else if (node && (node->getLeftChild() || node->getRightChild())) {
531  std::cout << "****** Found a node which only one child: " << node
532  << ", L/R: " << node->getLeftChild() << "/" << node->getRightChild() << std::endl;
533  }
534 
535  return depth;
536  }
537 
539  {
540  // The idea is to rebalance starting with the current node and the walking back up the branch
541  // until we reach the ultimate parent.
542  // First, if at internal node then check depth down either branch
543  if (node->getLeftChild() && node->getRightChild()) {
544  int depthLeft = getTreeDepth(node->getLeftChild());
545  int depthRight = getTreeDepth(node->getRightChild());
546 
547  if (depthLeft != node->getLeftChild()->getDepth() ||
548  depthRight != node->getRightChild()->getDepth()) {
549  std::cout << " --> node depth: " << getTreeDepth(node)
550  << ", left/right: " << depthLeft << "/" << node->getLeftChild()->getDepth()
551  << ", " << depthRight << "/" << node->getRightChild()->getDepth()
552  << ", parent/depth " << node->getParent() << "/"
553  << getTreeDepth(node->getParent()) << std::endl;
554  }
555 
556  // If left branch is longer then we rotate with the left child
557  if (depthLeft - depthRight > 2)
558  node = rotateWithLeftChild(node);
559  else if (depthRight - depthLeft > 2)
560  node = rotateWithRightChild(node);
561  }
562 
563  // Ok now rebalance the parent unless we are the root
564  if (node->getParent()) rebalance(node->getParent());
565  // In which case update the internal root node pointer
566  else
567  m_root = node;
568 
569  return;
570  }
571 
573  {
574  // Here we rebalance by rotating the root node with its left child
575  BSTNode* newTopNode = node->getLeftChild();
576  BSTNode* parent = node->getParent();
577 
578  // Check if there is a parent and if so make sure it points at the new node
579  if (parent) {
580  if (parent->getLeftChild() == node)
581  parent->setLeftChild(newTopNode);
582  else
583  parent->setRightChild(newTopNode);
584  }
585  // if no parent this the new root
586  else
587  m_root = newTopNode;
588 
589  // Swap parents (for the root node the parent is null)
590  newTopNode->setParent(parent);
591  node->setParent(newTopNode);
592 
593  // Reset the children
594  BSTNode* childToSwitch = newTopNode->getRightChild();
595 
596  childToSwitch->setParent(node);
597  node->setLeftChild(childToSwitch);
598  newTopNode->setRightChild(node);
599 
600  // Reset node depth
601  node->getLeftChild()->setDepth();
602 
603  return newTopNode;
604  }
605 
607  {
608  // Here we rebalance by rotating the root node with its left child
609  BSTNode* newTopNode = node->getRightChild();
610  BSTNode* parent = node->getParent();
611 
612  // Check if there is a parent and if so make sure it points at the new node
613  if (parent) {
614  if (parent->getLeftChild() == node)
615  parent->setLeftChild(newTopNode);
616  else
617  parent->setRightChild(newTopNode);
618  }
619  // if no parent this the new root
620  else
621  m_root = newTopNode;
622 
623  // Swap parents (for the root node the parent is null)
624  newTopNode->setParent(parent);
625  node->setParent(newTopNode);
626 
627  // Reset the children
628  BSTNode* childToSwitch = newTopNode->getLeftChild();
629 
630  childToSwitch->setParent(node);
631  node->setRightChild(childToSwitch);
632  newTopNode->setLeftChild(node);
633 
634  // Reset node depths
635  node->getRightChild()->setDepth();
636 
637  return newTopNode;
638  }
639 
640 } // namespace lar_cluster3d
void checkBeachLine(double) const
Definition: BeachLine.cxx:363
BSTNode * rotateWithLeftChild(BSTNode *)
Definition: BeachLine.cxx:572
IEvent * m_event
Definition: BeachLine.h:107
void setRightChild(BSTNode *node)
Definition: BeachLine.h:89
void setSuccessor(BSTNode *node)
Definition: BeachLine.h:91
BSTNode * m_associated
Definition: BeachLine.h:113
BSTNode class definiton specifically for use in constructing Voronoi diagrams. We are trying to follo...
Definition: BeachLine.h:34
void setDepth(int depth)
Definition: BeachLine.h:97
void rebalance(BSTNode *)
Tree balancing functions.
Definition: BeachLine.cxx:538
BSTNode * getParent() const
Definition: BeachLine.h:74
int getTreeDepth(const BSTNode *) const
This recovers the depth of longest branch in the tree below input node.
Definition: BeachLine.cxx:520
Represents the beachline implemented as a self balancing binary search tree.
BSTNode * findBestLeaf(const IEvent *event) const
Definition: BeachLine.h:132
BSTNode * getAssociated() const
Definition: BeachLine.h:79
int countLeaves() const
Definition: BeachLine.cxx:301
BSTNode * m_successor
Definition: BeachLine.h:112
std::pair< double, double > RootsPair
BSTNode * insertNewLeaf(IEvent *)
Definition: BeachLine.cxx:55
BSTNode * m_predecessor
Definition: BeachLine.h:111
void setLeftChild(BSTNode *node)
Definition: BeachLine.h:88
virtual double yPos() const =0
void setParent(BSTNode *node)
Allow setting of the points.
Definition: BeachLine.h:87
BSTNode * getRightChild() const
Definition: BeachLine.h:76
BSTNode * m_parent
Definition: BeachLine.h:108
virtual void setBSTNode(BSTNode *)=0
int traverseBeachLeft(BSTNode *) const
Definition: BeachLine.cxx:490
BSTNode * removeLeaf(BSTNode *)
Definition: BeachLine.cxx:204
void setAssociated(BSTNode *node)
Definition: BeachLine.h:92
virtual bool isValid() const =0
BSTNode()
Constructor.
Definition: BeachLine.h:39
int traverseBeachRight(BSTNode *) const
Definition: BeachLine.cxx:505
virtual double xPos() const =0
int getDepth() const
recover the data members
Definition: BeachLine.h:72
int traverseBeach() const
Definition: BeachLine.cxx:339
int countNodes() const
Definition: BeachLine.cxx:292
BSTNode * getPredecessor() const
Definition: BeachLine.h:77
BSTNode * rotateWithRightChild(BSTNode *)
Definition: BeachLine.cxx:606
BSTNode * m_leftChild
Definition: BeachLine.h:109
void setFace(dcel2d::Face *face)
Definition: BeachLine.h:95
Float_t e
Definition: plot.C:35
void setPredecessor(BSTNode *node)
Definition: BeachLine.h:90
virtual void setInvalid() const =0
Interface for configuring the particular algorithm tool.
IEvent * getEvent() const
Definition: BeachLine.h:73
BSTNode * getSuccessor() const
Definition: BeachLine.h:78
BSTNode * m_rightChild
Definition: BeachLine.h:110
BSTNode * getLeftChild() const
Definition: BeachLine.h:75
Event finding and building.
void setHalfEdge(dcel2d::HalfEdge *half)
Definition: BeachLine.h:94