|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
BST-based sweep status for active edges, ordered by ray-intersection distance. More...
Classes | |
| struct | EdgeKey |
| struct | EdgeKeyCmp |
Public Member Functions | |
| EdgeStatusTree (const Array< Point > &verts, const size_t n, const Point &query) | |
| void | insert (const size_t edge, const Point &dir) |
| void | erase (const size_t edge) |
| size_t | min () const |
| Return the nearest edge (smallest ray_param). | |
| bool | contains (const size_t edge) const |
| bool | is_empty () const |
Private Attributes | |
| DynSetTree< EdgeKey, Treap, EdgeKeyCmp > | tree_ |
| Array< Geom_Number > | params_ |
| Array< bool > | in_tree_ |
| const Array< Point > & | verts_ |
| const size_t | n_ |
| const Point & | query_ |
BST-based sweep status for active edges, ordered by ray-intersection distance.
Each edge is keyed by (ray_param, edge_index) computed at insertion time. Since the distance ordering of non-crossing edges is invariant between consecutive vertex events, the BST ordering remains valid throughout the sweep.
Backed by Aleph's Treap via DynSetTree. Provides O(log n) insert, erase and min (nearest edge).
Definition at line 9671 of file geom_algorithms.H.
|
inline |
Definition at line 9696 of file geom_algorithms.H.
References Aleph::Array< T >::append(), in_tree_, and params_.
Definition at line 9737 of file geom_algorithms.H.
References in_tree_.
Definition at line 9719 of file geom_algorithms.H.
References Aleph::divide_and_conquer_partition_dp(), in_tree_, params_, and tree_.
Referenced by Aleph::VisibilityPolygon::operator()().
|
inline |
Definition at line 9707 of file geom_algorithms.H.
References in_tree_, Aleph::Array< T >::insert(), n_, params_, query_, Aleph::VisibilityPolygon::ray_param(), tree_, and verts_.
Referenced by Aleph::VisibilityPolygon::operator()().
|
inline |
Definition at line 9742 of file geom_algorithms.H.
References tree_.
|
inline |
Return the nearest edge (smallest ray_param).
Returns n_ if the tree is empty.
Definition at line 9730 of file geom_algorithms.H.
Referenced by Aleph::VisibilityPolygon::operator()().
Definition at line 9690 of file geom_algorithms.H.
Referenced by EdgeStatusTree(), contains(), erase(), and insert().
|
private |
Definition at line 9692 of file geom_algorithms.H.
|
private |
Definition at line 9689 of file geom_algorithms.H.
Referenced by EdgeStatusTree(), erase(), and insert().
Definition at line 9693 of file geom_algorithms.H.
Referenced by insert().
|
private |
Definition at line 9688 of file geom_algorithms.H.
Referenced by erase(), insert(), is_empty(), and min().
Definition at line 9691 of file geom_algorithms.H.
Referenced by insert().