|
FE 0.13.1
Header-only C++ frontend library
|
This is an intrusive Link-Cut-Tree. More...
#include <fe/lct.h>
Public Types | |
| enum | Dir : size_t { Bot , Top } |
| Index into Node::kids. More... | |
Public Member Functions | |
| constexpr | Node () noexcept=default |
Getters | |
| constexpr P * | find (const K &k) noexcept |
Find k or the element just greater than k. | |
| bool | contains (const K &k) noexcept |
parent | |
| constexpr bool | is_aux_child () const noexcept |
| constexpr Node * | aux_parent () noexcept |
| constexpr P * | path_parent () noexcept |
Splay Tree | |
| constexpr Dir | dir (const Node *kid) const noexcept |
Which of Node::kids is kid? | |
| constexpr void | splay () noexcept |
| Splays this to the root of its splay tree. | |
| constexpr void | rotate (Dir i) noexcept |
Helper for Splay-Tree: rotates this's ith kid c into this's (x's) place: | |
Link-Cut-Tree | |
| constexpr void | link (Node *child) noexcept |
| Registers the edge this -> child in the aux tree. | |
| constexpr P * | expose () noexcept |
| Make a preferred path from this to root while putting this at the root of the aux tree. | |
| constexpr P * | lca (Node *other) noexcept |
Least Common Ancestor of this and other in the aux tree; leaves other exposed. | |
| constexpr bool | is_descendant_of (Node *other) noexcept |
| Is this a descendant of other in the aux tree? | |
Public Attributes | |
| Node * | parent = nullptr |
| parent or path-parent | |
| std::array< Node *, 2 > | kids = {} |
| Node::Bot/Node::Top children. | |
This is an intrusive Link-Cut-Tree.
Intrusive means that you have to inherit from this class via CRTP like this:
| enum fe::lct::Node::Dir : size_t |
Index into Node::kids.
| Enumerator | |
|---|---|
| Bot | left/deeper/bottom/leaf-direction |
| Top | right/shallower/top/root-direction |
|
constexprdefaultnoexcept |
|
inlineconstexprnoexcept |
|
inlinenodiscardnoexcept |
|
inlineconstexprnoexcept |
Which of Node::kids is kid?
|
inlineconstexprnoexcept |
Make a preferred path from this to root while putting this at the root of the aux tree.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Is this a child of Node::parent within the same splay tree?
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Helper for Splay-Tree: rotates this's ith kid c into this's (x's) place:
|
inlineconstexprnoexcept |
| std::array<Node*, 2> fe::lct::Node< P, K >::kids = {} |
Node::Bot/Node::Top children.
Definition at line 177 of file lct.h.
Referenced by fe::lct::Node< Node, D * >::is_aux_child(), and fe::lct::Node< Node, D * >::link().
| Node* fe::lct::Node< P, K >::parent = nullptr |
parent or path-parent
Definition at line 176 of file lct.h.
Referenced by fe::lct::Node< Node, D * >::expose().