LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
This defines the actual beach line. The idea is to implement this as a self balancing binary search tree. More...
#include "BeachLine.h"
Public Member Functions | |
BeachLine () | |
bool | isEmpty () const |
void | setEmpty () |
const BSTNode * | getTopNode () const |
BSTNode * | findBestLeaf (const IEvent *event) const |
BSTNode * | insertNewLeaf (IEvent *) |
BSTNode * | removeLeaf (BSTNode *) |
int | getHeight () const |
int | countNodes () const |
int | countLeaves () const |
int | traverseBeach () const |
Private Member Functions | |
BSTNode * | insertNewLeaf (IEvent *, BSTNode *) |
BSTNode * | findBestLeaf (const IEvent *, BSTNode *) const |
void | countNodes (const BSTNode *, int &) const |
void | countLeaves (const BSTNode *, int &) const |
int | traverseBeachLeft (BSTNode *) const |
int | traverseBeachRight (BSTNode *) const |
void | checkBeachLine (double) const |
int | getTreeDepth (const BSTNode *) const |
This recovers the depth of longest branch in the tree below input node. More... | |
void | rebalance (BSTNode *) |
Tree balancing functions. More... | |
BSTNode * | rotateWithLeftChild (BSTNode *) |
BSTNode * | rotateWithRightChild (BSTNode *) |
Private Attributes | |
BSTNode * | m_root |
BSTNodeList | m_nodeVec |
EventUtilities | m_utilities |
This defines the actual beach line. The idea is to implement this as a self balancing binary search tree.
Definition at line 125 of file BeachLine.h.
|
inline |
Definition at line 127 of file BeachLine.h.
|
private |
Definition at line 363 of file BeachLine.cxx.
References e, voronoi2d::BSTNode::getAssociated(), voronoi2d::BSTNode::getEvent(), voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getParent(), voronoi2d::BSTNode::getPredecessor(), voronoi2d::BSTNode::getRightChild(), voronoi2d::BSTNode::getSuccessor(), voronoi2d::IEvent::isValid(), voronoi2d::IEvent::xPos(), and voronoi2d::IEvent::yPos().
int voronoi2d::BeachLine::countLeaves | ( | ) | const |
Definition at line 301 of file BeachLine.cxx.
Referenced by voronoi2d::VoronoiDiagram::buildVoronoiDiagram().
|
private |
Definition at line 326 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), and voronoi2d::BSTNode::getRightChild().
int voronoi2d::BeachLine::countNodes | ( | ) | const |
Definition at line 292 of file BeachLine.cxx.
|
private |
Definition at line 310 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), and voronoi2d::BSTNode::getRightChild().
Definition at line 132 of file BeachLine.h.
References findBestLeaf().
Referenced by findBestLeaf().
|
private |
Definition at line 72 of file BeachLine.cxx.
References voronoi2d::BSTNode::getEvent(), voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getPredecessor(), voronoi2d::BSTNode::getRightChild(), and voronoi2d::BSTNode::getSuccessor().
|
inline |
Definition at line 135 of file BeachLine.h.
|
inline |
Definition at line 131 of file BeachLine.h.
Referenced by voronoi2d::VoronoiDiagram::terminateInfiniteEdges().
|
private |
This recovers the depth of longest branch in the tree below input node.
Definition at line 520 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), and voronoi2d::BSTNode::getRightChild().
Definition at line 55 of file BeachLine.cxx.
Referenced by voronoi2d::VoronoiDiagram::handleSiteEvents().
Definition at line 95 of file BeachLine.cxx.
References voronoi2d::BSTNode::BSTNode(), voronoi2d::BSTNode::getAssociated(), voronoi2d::BSTNode::getEvent(), voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getParent(), voronoi2d::BSTNode::getPredecessor(), voronoi2d::BSTNode::setAssociated(), voronoi2d::BSTNode::setDepth(), voronoi2d::IEvent::setInvalid(), voronoi2d::BSTNode::setLeftChild(), voronoi2d::BSTNode::setParent(), voronoi2d::BSTNode::setPredecessor(), voronoi2d::BSTNode::setRightChild(), voronoi2d::BSTNode::setSuccessor(), and voronoi2d::IEvent::xPos().
|
inline |
Definition at line 129 of file BeachLine.h.
|
private |
Tree balancing functions.
Definition at line 538 of file BeachLine.cxx.
References voronoi2d::BSTNode::getDepth(), voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getParent(), and voronoi2d::BSTNode::getRightChild().
Definition at line 204 of file BeachLine.cxx.
References voronoi2d::BSTNode::getAssociated(), voronoi2d::BSTNode::getEvent(), voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getParent(), voronoi2d::BSTNode::getPredecessor(), voronoi2d::BSTNode::getRightChild(), voronoi2d::BSTNode::getSuccessor(), voronoi2d::BSTNode::setAssociated(), voronoi2d::BSTNode::setDepth(), voronoi2d::BSTNode::setFace(), voronoi2d::BSTNode::setHalfEdge(), voronoi2d::IEvent::setInvalid(), voronoi2d::BSTNode::setLeftChild(), voronoi2d::BSTNode::setParent(), voronoi2d::BSTNode::setPredecessor(), voronoi2d::BSTNode::setRightChild(), voronoi2d::BSTNode::setSuccessor(), and voronoi2d::IEvent::xPos().
Referenced by voronoi2d::VoronoiDiagram::handleCircleEvents().
Definition at line 572 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getParent(), voronoi2d::BSTNode::getRightChild(), voronoi2d::BSTNode::setDepth(), voronoi2d::BSTNode::setLeftChild(), voronoi2d::BSTNode::setParent(), and voronoi2d::BSTNode::setRightChild().
Definition at line 606 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getParent(), voronoi2d::BSTNode::getRightChild(), voronoi2d::BSTNode::setDepth(), voronoi2d::BSTNode::setLeftChild(), voronoi2d::BSTNode::setParent(), and voronoi2d::BSTNode::setRightChild().
|
inline |
Definition at line 130 of file BeachLine.h.
int voronoi2d::BeachLine::traverseBeach | ( | ) | const |
Definition at line 339 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getPredecessor(), voronoi2d::BSTNode::getRightChild(), and voronoi2d::BSTNode::getSuccessor().
Referenced by voronoi2d::VoronoiDiagram::buildVoronoiDiagram().
|
private |
Definition at line 490 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getPredecessor(), and voronoi2d::BSTNode::getRightChild().
|
private |
Definition at line 505 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getRightChild(), and voronoi2d::BSTNode::getSuccessor().
|
private |
Definition at line 166 of file BeachLine.h.
|
private |
Definition at line 165 of file BeachLine.h.
|
private |
Definition at line 168 of file BeachLine.h.