LArSoft
v07_13_02
Liquid Argon Software toolkit - http://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 129 of file BeachLine.h.
|
inline |
Definition at line 132 of file BeachLine.h.
|
private |
Definition at line 369 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(), max, voronoi2d::IEvent::xPos(), and voronoi2d::IEvent::yPos().
int voronoi2d::BeachLine::countLeaves | ( | ) | const |
Definition at line 305 of file BeachLine.cxx.
Referenced by voronoi2d::VoronoiDiagram::buildVoronoiDiagram().
|
private |
Definition at line 332 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), and voronoi2d::BSTNode::getRightChild().
int voronoi2d::BeachLine::countNodes | ( | ) | const |
Definition at line 296 of file BeachLine.cxx.
|
private |
Definition at line 314 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), and voronoi2d::BSTNode::getRightChild().
Definition at line 137 of file BeachLine.h.
References findBestLeaf().
Referenced by findBestLeaf().
|
private |
Definition at line 74 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 140 of file BeachLine.h.
|
inline |
Definition at line 136 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 498 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getRightChild(), and max.
Definition at line 57 of file BeachLine.cxx.
Referenced by voronoi2d::VoronoiDiagram::handleSiteEvents().
Definition at line 98 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 134 of file BeachLine.h.
|
private |
Tree balancing functions.
Definition at line 517 of file BeachLine.cxx.
References voronoi2d::BSTNode::getDepth(), voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getParent(), and voronoi2d::BSTNode::getRightChild().
Definition at line 206 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 545 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 577 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 135 of file BeachLine.h.
int voronoi2d::BeachLine::traverseBeach | ( | ) | const |
Definition at line 345 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 466 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getPredecessor(), and voronoi2d::BSTNode::getRightChild().
|
private |
Definition at line 482 of file BeachLine.cxx.
References voronoi2d::BSTNode::getLeftChild(), voronoi2d::BSTNode::getRightChild(), and voronoi2d::BSTNode::getSuccessor().
|
private |
Definition at line 171 of file BeachLine.h.
|
private |
Definition at line 170 of file BeachLine.h.
|
private |
Definition at line 173 of file BeachLine.h.