|
LAL: Linear Arrangement Library 24.10.00
A library focused on algorithms on linear arrangements of graphs.
|
Implementation of Mačutek's algorithm for chunking. More...
#include <Macutek.hpp>
Public Member Functions | |
| chunks_Macutek (const graphs::rooted_tree &rt, const arrangement_t &arr) noexcept | |
| Constructor. | |
| void | chunk_input_tree () noexcept |
| Main method of this class. | |
| const linarr::chunk_sequence & | get_chunk_sequence () const noexcept |
| Returns a constant reference to the chunk sequence m_sequence. | |
| linarr::chunk_sequence && | retrieve_chunk_sequence () noexcept |
| Moves the chunk sequence m_sequence. | |
Protected Member Functions | |
| std::size_t | node_to_chunk (const node u) const noexcept |
| Returns the chunk index of node u. | |
| void | set_chunk_index (const node u, const std::size_t i) noexcept |
| Sets the chunk index of node u to index i. | |
Private Types | |
| typedef chunks_generic< arrangement_t > | generic |
| Useful typedef. | |
Private Member Functions | |
| void | set_parent_chunks () noexcept |
| Set the parent node of all chunks. | |
| void | set_parent_chunk (linarr::chunk &c) noexcept |
| Set the parent node of a chunks. | |
| linarr::chunk & | last_chunk () noexcept |
| Returns a reference to the last chunk in the sentence. | |
Private Attributes | |
| linarr::chunk_sequence | m_sequence |
| The sequence of chunks obtained. | |
| const uint64_t | m_n |
| Number of vertices of the tree. | |
| const arrangement_t | m_arr |
| Linear arrangement. | |
| const graphs::rooted_tree & | m_rt |
| Input rooted tree. | |
Implementation of Mačutek's algorithm for chunking.
Chunking applied to syntactic dependency trees alone (a.k.a., rooted trees).
See [35] for a complete definition of Mačutek (et al.)'s chunks.
| arr_t | Type of arrangement. |
|
inlinenoexcept |
Constructor.
| rt | Input rooted tree. |
| arr | Input linear arrangement. |
|
inlinenoexcept |
Main method of this class.
Calling this method will chunk the input rooted tree using Mačutek (et al.)'s definition.