SDSL 3.0.3
Succinct Data Structure Library
Loading...
Searching...
No Matches
sdsl::lcp_byte< t_width > Class Template Reference

A class for a simple compressed version of LCP information. More...

#include <lcp_byte.hpp>

Public Types

enum  { fast_access = 0 , text_order = 0 , sa_order = 1 }
typedef int_vector< t_width >::value_type value_type
typedef random_access_const_iterator< lcp_byteconst_iterator
typedef const_iterator iterator
typedef const value_type const_reference
typedef const_reference reference
typedef const_referencepointer
typedef const pointer const_pointer
typedef int_vector ::size_type size_type
typedef ptrdiff_t difference_type
typedef lcp_plain_tag lcp_category
typedef lcp_tag index_tag
template<class Cst>
using type = lcp_byte

Public Member Functions

 lcp_byte ()=default
 Default Constructor.
 lcp_byte (lcp_byte const &)=default
 lcp_byte (lcp_byte &&)=default
lcp_byteoperator= (lcp_byte const &)=default
lcp_byteoperator= (lcp_byte &&)=default
 lcp_byte (cache_config &config)
 Constructor.
size_type size () const
 Number of elements in the instance.
bool empty () const
 Returns if the data strucutre is empty.
const_iterator begin () const
 Returns a const_iterator to the first element.
const_iterator end () const
 Returns a const_iterator to the element after the last element.
value_type operator[] (size_type i) const
 []-operator
size_type serialize (std::ostream &out, structure_tree_node *v=nullptr, std::string name="") const
 Serialize to a stream.
void load (std::istream &in)
 Load from a stream.
template<typename archive_t>
void CEREAL_SAVE_FUNCTION_NAME (archive_t &ar) const
template<typename archive_t>
void CEREAL_LOAD_FUNCTION_NAME (archive_t &ar)
bool operator== (lcp_byte const &other) const noexcept
 Equality operator.
bool operator!= (lcp_byte const &other) const noexcept
 Inequality operator.

Static Public Member Functions

static size_type max_size ()
 Returns the largest size that lcp_byte can ever have.

Detailed Description

template<uint8_t t_width = 0>
class sdsl::lcp_byte< t_width >

A class for a simple compressed version of LCP information.

Each small LCP value x=LCP[i] ( $\leq 254$) is represented in a byte. For x=LCP[i] $\geq 255$ a pair (i, x) is store an list of word pairs. This list is binary search to access LCP[i].

Time complexity
  • $\Order{1}$ if the value is less than 255 and
  • $\Order{\log n}$ ( $n=size()$) otherwise.
Reference
Mohamed Ibrahim Abouelhoda, Stefan Kurtz, Enno Ohlebusch: Replacing suffix trees with enhanced suffix arrays. J. Discrete Algorithms 2(1): 53-86 (2004)

Definition at line 45 of file lcp_byte.hpp.

Member Typedef Documentation

◆ const_iterator

template<uint8_t t_width = 0>
typedef random_access_const_iterator<lcp_byte> sdsl::lcp_byte< t_width >::const_iterator

Definition at line 49 of file lcp_byte.hpp.

◆ const_pointer

template<uint8_t t_width = 0>
typedef const pointer sdsl::lcp_byte< t_width >::const_pointer

Definition at line 54 of file lcp_byte.hpp.

◆ const_reference

template<uint8_t t_width = 0>
typedef const value_type sdsl::lcp_byte< t_width >::const_reference

Definition at line 51 of file lcp_byte.hpp.

◆ difference_type

template<uint8_t t_width = 0>
typedef ptrdiff_t sdsl::lcp_byte< t_width >::difference_type

Definition at line 56 of file lcp_byte.hpp.

◆ index_tag

template<uint8_t t_width = 0>
typedef lcp_tag sdsl::lcp_byte< t_width >::index_tag

Definition at line 59 of file lcp_byte.hpp.

◆ iterator

template<uint8_t t_width = 0>
typedef const_iterator sdsl::lcp_byte< t_width >::iterator

Definition at line 50 of file lcp_byte.hpp.

◆ lcp_category

template<uint8_t t_width = 0>
typedef lcp_plain_tag sdsl::lcp_byte< t_width >::lcp_category

Definition at line 58 of file lcp_byte.hpp.

◆ pointer

template<uint8_t t_width = 0>
typedef const_reference* sdsl::lcp_byte< t_width >::pointer

Definition at line 53 of file lcp_byte.hpp.

◆ reference

template<uint8_t t_width = 0>
typedef const_reference sdsl::lcp_byte< t_width >::reference

Definition at line 52 of file lcp_byte.hpp.

◆ size_type

template<uint8_t t_width = 0>
typedef int_vector ::size_type sdsl::lcp_byte< t_width >::size_type

Definition at line 55 of file lcp_byte.hpp.

◆ type

template<uint8_t t_width = 0>
template<class Cst>
using sdsl::lcp_byte< t_width >::type = lcp_byte

Definition at line 69 of file lcp_byte.hpp.

◆ value_type

template<uint8_t t_width = 0>
typedef int_vector<t_width>::value_type sdsl::lcp_byte< t_width >::value_type

Definition at line 48 of file lcp_byte.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<uint8_t t_width = 0>
anonymous enum
Enumerator
fast_access 
text_order 
sa_order 

Definition at line 61 of file lcp_byte.hpp.

Constructor & Destructor Documentation

◆ lcp_byte() [1/4]

template<uint8_t t_width = 0>
sdsl::lcp_byte< t_width >::lcp_byte ( )
default

Default Constructor.

◆ lcp_byte() [2/4]

template<uint8_t t_width = 0>
sdsl::lcp_byte< t_width >::lcp_byte ( lcp_byte< t_width > const & )
default

◆ lcp_byte() [3/4]

template<uint8_t t_width = 0>
sdsl::lcp_byte< t_width >::lcp_byte ( lcp_byte< t_width > && )
default

◆ lcp_byte() [4/4]

template<uint8_t t_width = 0>
sdsl::lcp_byte< t_width >::lcp_byte ( cache_config & config)
inline

Constructor.

Definition at line 88 of file lcp_byte.hpp.

Member Function Documentation

◆ begin()

template<uint8_t t_width = 0>
const_iterator sdsl::lcp_byte< t_width >::begin ( ) const
inline

Returns a const_iterator to the first element.

Definition at line 143 of file lcp_byte.hpp.

◆ CEREAL_LOAD_FUNCTION_NAME()

template<uint8_t t_width = 0>
template<typename archive_t>
void sdsl::lcp_byte< t_width >::CEREAL_LOAD_FUNCTION_NAME ( archive_t & ar)
inline

Definition at line 200 of file lcp_byte.hpp.

◆ CEREAL_SAVE_FUNCTION_NAME()

template<uint8_t t_width = 0>
template<typename archive_t>
void sdsl::lcp_byte< t_width >::CEREAL_SAVE_FUNCTION_NAME ( archive_t & ar) const
inline

Definition at line 192 of file lcp_byte.hpp.

◆ empty()

template<uint8_t t_width = 0>
bool sdsl::lcp_byte< t_width >::empty ( ) const
inline

Returns if the data strucutre is empty.

Definition at line 137 of file lcp_byte.hpp.

◆ end()

template<uint8_t t_width = 0>
const_iterator sdsl::lcp_byte< t_width >::end ( ) const
inline

Returns a const_iterator to the element after the last element.

Definition at line 149 of file lcp_byte.hpp.

◆ load()

template<uint8_t t_width = 0>
void sdsl::lcp_byte< t_width >::load ( std::istream & in)
inline

Load from a stream.

Definition at line 184 of file lcp_byte.hpp.

◆ max_size()

template<uint8_t t_width = 0>
size_type sdsl::lcp_byte< t_width >::max_size ( )
inlinestatic

Returns the largest size that lcp_byte can ever have.

Definition at line 131 of file lcp_byte.hpp.

◆ operator!=()

template<uint8_t t_width = 0>
bool sdsl::lcp_byte< t_width >::operator!= ( lcp_byte< t_width > const & other) const
inlinenoexcept

Inequality operator.

Definition at line 215 of file lcp_byte.hpp.

◆ operator=() [1/2]

template<uint8_t t_width = 0>
lcp_byte & sdsl::lcp_byte< t_width >::operator= ( lcp_byte< t_width > && )
default

◆ operator=() [2/2]

template<uint8_t t_width = 0>
lcp_byte & sdsl::lcp_byte< t_width >::operator= ( lcp_byte< t_width > const & )
default

◆ operator==()

template<uint8_t t_width = 0>
bool sdsl::lcp_byte< t_width >::operator== ( lcp_byte< t_width > const & other) const
inlinenoexcept

Equality operator.

Definition at line 208 of file lcp_byte.hpp.

◆ operator[]()

template<uint8_t t_width = 0>
value_type sdsl::lcp_byte< t_width >::operator[] ( size_type i) const
inline

[]-operator

Parameters
iIndex of the value. $ i \in [0..size()-1]$. Time complexity: O(1) for small and O(log n) for large values

Definition at line 158 of file lcp_byte.hpp.

◆ serialize()

template<uint8_t t_width = 0>
size_type sdsl::lcp_byte< t_width >::serialize ( std::ostream & out,
structure_tree_node * v = nullptr,
std::string name = "" ) const
inline

Serialize to a stream.

Definition at line 172 of file lcp_byte.hpp.

◆ size()

template<uint8_t t_width = 0>
size_type sdsl::lcp_byte< t_width >::size ( ) const
inline

Number of elements in the instance.

Definition at line 125 of file lcp_byte.hpp.


The documentation for this class was generated from the following file:
  • /builddir/build/BUILD/sdsl-lite-3.0.3-build/sdsl-lite-3.0.3/include/sdsl/lcp_byte.hpp