4#ifndef INCLUDED_SDSL_SUPPORT_LCP_TREE
5#define INCLUDED_SDSL_SUPPORT_LCP_TREE
30 size_type n = lcp_buf.
size();
40 for (size_type i = 0, x; i < n; ++i)
43 while (!vec_stack.
empty() and x < vec_stack.
top())
54 while (!vec_stack.
empty())
62 if (fc_cnt < fc_lcp.
size())
78template <
class t_lcp,
class t_cst>
143 m_lcp = t_lcp(config, fc_lcp_key);
151 return m_cst->size();
161 return t_lcp::max_size();
166 return m_lcp.empty();
188 return m_lcp[m_cst->tlcp_idx(i)];
196 written_bytes += m_lcp.serialize(out, child,
"lcp");
198 return written_bytes;
202 void load(std::istream & in, t_cst
const * cst =
nullptr)
208 template <
typename archive_t>
214 template <
typename archive_t>
223 return (m_lcp == other.m_lcp);
229 return !(*
this == other);
234template <
class t_lcp = lcp_wt<>>
237 template <
class t_cst>
bits.hpp contains the sdsl::bits class.
cereal.hpp offers cereal support
This class composes a virtual LCP array from a LCP arrays which is in suffix array order (e....
const_iterator begin() const
Returns a const_iterator to the first element.
void CEREAL_LOAD_FUNCTION_NAME(archive_t &ar)
bool operator==(_lcp_support_tree const &other) const noexcept
Equality operator.
value_type operator[](size_type i) const
[]-operator
t_lcp::size_type size_type
_lcp_support_tree & operator=(_lcp_support_tree const &)=default
size_type serialize(std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
Serialize to a stream.
void set_cst(t_cst const *cst)
const_reference reference
lcp_tree_compressed_tag lcp_category
random_access_const_iterator< _lcp_support_tree > const_iterator
_lcp_support_tree(cache_config &config, t_cst const *cst=nullptr)
Constructor.
bool operator!=(_lcp_support_tree const &other) const noexcept
Inequality operator.
~_lcp_support_tree()=default
_lcp_support_tree(_lcp_support_tree const &)=default
Copy/Move constructor.
t_lcp::value_type value_type
void load(std::istream &in, t_cst const *cst=nullptr)
Load from a stream.
static size_type max_size()
const value_type const_reference
const pointer const_pointer
_lcp_support_tree()=default
Default constructor.
const_reference * pointer
_lcp_support_tree & operator=(_lcp_support_tree &&)=default
void CEREAL_SAVE_FUNCTION_NAME(archive_t &ar) const
const_iterator end() const
Returns a const_iterator to the element after the last element.
t_lcp::difference_type difference_type
_lcp_support_tree(_lcp_support_tree &&)=default
uint64_t size() const
Returns the number of elements currently stored.
A generic vector class for integers of width .
size_type size() const noexcept
The number of elements in the int_vector.
void shrink_to_fit()
Free unused allocated memory.
void resize(const size_type size)
Resize the int_vector in terms of elements.
Generic iterator for a random access container.
Stack which contains elements from [0..n] in sorted order. Duplicates are possible.
bool empty() const
Returns if the stack is empty.
size_type top() const
Returns the topmost index on the stack.
bool pop()
Pop the topmost index of the stack.
bool push(size_type x)
Push the index x of vector vec onto the stack.
static structure_tree_node * add_child(structure_tree_node *v, std::string const &name, std::string const &type)
static void add_size(structure_tree_node *v, uint64_t value)
int_vector.hpp contains the sdsl::int_vector class.
int_vector_buffer.hpp contains the sdsl::int_vector_buffer class.
io.hpp contains some methods for reading/writing sdsl structures.
iterators.hpp contains an generic iterator for random access containers.
lcp_wt.hpp contains a (compressed) LCP array based on a WT.
std::string to_string(T const &t, int w=1)
Namespace for the succinct data structure library.
int remove(std::string const &)
Remove a file.
std::string tmp_file(cache_config const &config, std::string name_part="")
Returns a name for a temporary file. I.e. the name was not used before.
std::string cache_file_name(std::string const &key, cache_config const &config)
Returns the file name of the resource.
bool store_to_file(T const &v, std::string const &file)
Store a data structure to a file.
uint64_t int_vector_size_type
void construct_first_child_lcp(int_vector_buffer<> &lcp_buf, int_vector<> &fc_lcp)
Contains declarations and definitions of data structure concepts.
sorted_multi_stack_support.hpp contains a data structure for a stack which contains elements from [0....
_lcp_support_tree lcp_type
static constexpr uint32_t hi(uint64_t x)
Position of the most significant set bit the 64-bit word x.
Helper class for construction process.
Helper class which provides _lcp_support_tree the context of a CST.
structure_tree.hpp contains a helper class which can represent the memory structure of a class.
util.hpp contains some helper methods for int_vector and other stuff like demangle class names.