45#include <lal/graphs/rooted_tree.hpp>
46#include <lal/linarr/chunking/chunk.hpp>
47#include <lal/detail/linarr/chunking/generic.hpp>
61template <
class arrangement_t>
90 for (; p <
m_n; ++p) {
94 const bool are_syntactically_linked =
97 if (are_syntactically_linked) {
Implementation of Mačutek's algorithm for chunking.
Definition Macutek.hpp:62
void chunk_input_tree() noexcept
Main method of this class.
Definition Macutek.hpp:81
const uint64_t m_n
Number of vertices of the tree.
Definition generic.hpp:147
const arrangement_t m_arr
Linear arrangement.
Definition generic.hpp:145
linarr::chunk_sequence m_sequence
The sequence of chunks obtained.
Definition generic.hpp:150
chunks_Macutek(const graphs::rooted_tree &rt, const arrangement_t &arr) noexcept
Constructor.
Definition Macutek.hpp:69
void set_parent_chunks() noexcept
Set the parent node of all chunks.
Definition Macutek.hpp:112
void set_parent_chunk(linarr::chunk &c) noexcept
Set the parent node of a chunks.
Definition generic.hpp:109
linarr::chunk & last_chunk() noexcept
Returns a reference to the last chunk in the sentence.
Definition generic.hpp:95
const graphs::rooted_tree & m_rt
Input rooted tree.
Definition generic.hpp:143
Basic algorithms existent in every definition of chunking.
Definition generic.hpp:61
const uint64_t m_n
Number of vertices of the tree.
Definition generic.hpp:147
const arrangement_t m_arr
Linear arrangement.
Definition generic.hpp:145
linarr::chunk_sequence m_sequence
The sequence of chunks obtained.
Definition generic.hpp:150
void set_parent_chunk(linarr::chunk &c) noexcept
Set the parent node of a chunks.
Definition generic.hpp:109
linarr::chunk & last_chunk() noexcept
Returns a reference to the last chunk in the sentence.
Definition generic.hpp:95
const graphs::rooted_tree & m_rt
Input rooted tree.
Definition generic.hpp:143
bool has_edge(const node u, const node v) const noexcept
Returns true if the edge exists in the graph.
Rooted tree graph class.
Definition rooted_tree.hpp:109
void push_chunk() noexcept
Adds a new chunk to the collection.
Definition chunk_sequence.hpp:155
std::size_t size() const noexcept
Returns the number of chunks.
Definition chunk_sequence.hpp:181
void init(const std::size_t n) noexcept
Initializes this chunk sequence.
Definition chunk_sequence.hpp:121
void add_node(const node u) noexcept
Adds a new node to this chunk.
Definition chunk.hpp:78
Main namespace of the library.
Definition basic_types.hpp:48
uint64_t node
Node type. See Node / Vertex page for further details.
Definition basic_types.hpp:51
Typesafe position type.
Definition basic_types.hpp:244