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

A class for the compressed version of lcp information of an suffix array. More...

#include <lcp_wt.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_wtconst_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 wt_huff< bit_vector, rank_support_v<>, select_support_scan< 1 >, select_support_scan< 0 > > small_lcp_type
typedef lcp_plain_tag lcp_category
typedef lcp_tag index_category
template<class Cst>
using type = lcp_wt

Public Member Functions

 lcp_wt ()=default
 Default Constructor.
 lcp_wt (lcp_wt const &)=default
 Copy / Move constructor.
 lcp_wt (lcp_wt &&)=default
lcp_wtoperator= (lcp_wt const &)=default
lcp_wtoperator= (lcp_wt &&)=default
 lcp_wt (cache_config &config, std::string other_key="")
 Constructor.
size_type size () const
 Number of elements in the instance.
bool empty () const
 Returns if the data structure 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_wt const &other) const noexcept
 Equality operator.
bool operator!= (lcp_wt const &other) const noexcept
 Inequality operator.

Static Public Member Functions

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

Detailed Description

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

A class for the compressed version of lcp information of an suffix array.

We use $H_0$ bit for each lcp values < 255 and $ log n $ bits for each LCP value which is greater than 254.

Template Parameters
t_widthWidth of int_vector storing the large LCP values.
Time complexity
  • $\Order{1}$ if the value is less than 255 and
  • $\Order{\log n}$ ( $n=size()$) otherwise.

Definition at line 44 of file lcp_wt.hpp.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 48 of file lcp_wt.hpp.

◆ const_pointer

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

Definition at line 53 of file lcp_wt.hpp.

◆ const_reference

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

Definition at line 50 of file lcp_wt.hpp.

◆ difference_type

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

Definition at line 55 of file lcp_wt.hpp.

◆ index_category

template<uint8_t t_width = 0>
typedef lcp_tag sdsl::lcp_wt< t_width >::index_category

Definition at line 59 of file lcp_wt.hpp.

◆ iterator

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

Definition at line 49 of file lcp_wt.hpp.

◆ lcp_category

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

Definition at line 58 of file lcp_wt.hpp.

◆ pointer

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

Definition at line 52 of file lcp_wt.hpp.

◆ reference

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

Definition at line 51 of file lcp_wt.hpp.

◆ size_type

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

Definition at line 54 of file lcp_wt.hpp.

◆ small_lcp_type

template<uint8_t t_width = 0>
typedef wt_huff<bit_vector, rank_support_v<>, select_support_scan<1>, select_support_scan<0> > sdsl::lcp_wt< t_width >::small_lcp_type

Definition at line 56 of file lcp_wt.hpp.

◆ type

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

Definition at line 69 of file lcp_wt.hpp.

◆ value_type

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

Definition at line 47 of file lcp_wt.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_wt.hpp.

Constructor & Destructor Documentation

◆ lcp_wt() [1/4]

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

Default Constructor.

◆ lcp_wt() [2/4]

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

Copy / Move constructor.

◆ lcp_wt() [3/4]

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

◆ lcp_wt() [4/4]

template<uint8_t t_width = 0>
sdsl::lcp_wt< t_width >::lcp_wt ( cache_config & config,
std::string other_key = "" )
inline

Constructor.

Definition at line 88 of file lcp_wt.hpp.

Member Function Documentation

◆ begin()

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

Returns a const_iterator to the first element.

Definition at line 152 of file lcp_wt.hpp.

◆ CEREAL_LOAD_FUNCTION_NAME()

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

Definition at line 204 of file lcp_wt.hpp.

◆ CEREAL_SAVE_FUNCTION_NAME()

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

Definition at line 197 of file lcp_wt.hpp.

◆ empty()

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

Returns if the data structure is empty.

Definition at line 146 of file lcp_wt.hpp.

◆ end()

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

Returns a const_iterator to the element after the last element.

Definition at line 158 of file lcp_wt.hpp.

◆ load()

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

Load from a stream.

Definition at line 190 of file lcp_wt.hpp.

◆ max_size()

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

Returns the largest size that lcp_wt can ever have.

Definition at line 140 of file lcp_wt.hpp.

◆ operator!=()

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

Inequality operator.

Definition at line 217 of file lcp_wt.hpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator==()

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

Equality operator.

Definition at line 211 of file lcp_wt.hpp.

◆ operator[]()

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

[]-operator

Parameters
iIndex of the value. $ i \in [0..size()-1]$.

Definition at line 166 of file lcp_wt.hpp.

◆ serialize()

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

Serialize to a stream.

Definition at line 179 of file lcp_wt.hpp.

◆ size()

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

Number of elements in the instance.

Definition at line 134 of file lcp_wt.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_wt.hpp