SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
|
Public Types | |
enum | { fast_access = 0, text_order = 0, sa_order = 1 } |
typedef vlc_vec_type::value_type | value_type |
typedef random_access_const_iterator < lcp_vlc > | const_iterator |
typedef const_iterator | iterator |
typedef const value_type | const_reference |
typedef const_reference | reference |
typedef const_reference * | pointer |
typedef const pointer | const_pointer |
typedef vlc_vec_type::size_type | size_type |
typedef vlc_vec_type::difference_type | difference_type |
typedef lcp_plain_tag | lcp_category |
Public Member Functions | |
lcp_vlc () | |
Default Constructor. | |
~lcp_vlc () | |
Default Destructor. | |
lcp_vlc (const lcp_vlc &lcp_c) | |
Copy constructor. | |
template<class Text , class Sa > | |
lcp_vlc (const Text &text, const Sa &sa) | |
Constructor for the compressed lcp from a compressed suffix array. | |
template<uint8_t int_width, class size_type_class > | |
lcp_vlc (int_vector_file_buffer< int_width, size_type_class > &lcp_buf) | |
Construct the lcp array from an int_vector_file_buffer. | |
template<class Text , class Sa > | |
void | construct (const Text &text, const Sa &sa) |
template<uint8_t int_width, class size_type_class > | |
void | construct (int_vector_file_buffer< int_width, size_type_class > &lcp_buf) |
size_type | size () const |
Number of elements in the instance. | |
bool | empty () const |
Returns if the data strucutre is empty. | |
void | swap (lcp_vlc &lcp_c) |
Swap method for lcp_vlc. | |
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 | |
lcp_vlc & | operator= (const lcp_vlc &lcp_c) |
Assignment Operator. | |
bool | operator== (const lcp_vlc &lcp_c) const |
Equality Operator. | |
bool | operator!= (const lcp_vlc &lcp_c) const |
Unequality Operator. | |
size_type | serialize (std::ostream &out, structure_tree_node *v=NULL, std::string name="") const |
Serialize to a stream. | |
void | load (std::istream &in) |
Load from a stream. | |
Static Public Member Functions | |
static size_type | max_size () |
Returns the largest size that lcp_vlc can ever have. |
lcp_vlc< vlc_vec_type >::const_iterator sdsl::lcp_vlc< vlc_vec_type >::begin | ( | ) | const |
bool sdsl::lcp_vlc< vlc_vec_type >::empty | ( | ) | const [inline] |
Returns if the data strucutre is empty.
Required for the Container Concept of the STL.A
lcp_vlc< vlc_vec_type >::const_iterator sdsl::lcp_vlc< vlc_vec_type >::end | ( | ) | const |
Returns a const_iterator to the element after the last element.
Required for the STL Container Concept.
void sdsl::lcp_vlc< vlc_vec_type >::load | ( | std::istream & | in | ) |
Load from a stream.
in | Inputstream to load the data structure from. |
static size_type sdsl::lcp_vlc< vlc_vec_type >::max_size | ( | ) | [inline, static] |
bool sdsl::lcp_vlc< vlc_vec_type >::operator!= | ( | const lcp_vlc< vlc_vec_type > & | lcp_c | ) | const |
Unequality Operator.
Two Instances of lcp_vlc are equal if not all their members are equal.
lcp_vlc< vlc_vec_type > & sdsl::lcp_vlc< vlc_vec_type >::operator= | ( | const lcp_vlc< vlc_vec_type > & | lcp_c | ) |
Assignment Operator.
Required for the Assignable Concept of the STL.
bool sdsl::lcp_vlc< vlc_vec_type >::operator== | ( | const lcp_vlc< vlc_vec_type > & | lcp_c | ) | const |
Equality Operator.
Two Instances of lcp_vlc are equal if all their members are equal.
lcp_vlc< vlc_vec_type >::value_type sdsl::lcp_vlc< vlc_vec_type >::operator[] | ( | size_type | i | ) | const [inline] |
[]-operator
i | Index of the value. . Time complexity: O(suffix array access) Required for the STL Random Access Container Concept. |
lcp_vlc< vlc_vec_type >::size_type sdsl::lcp_vlc< vlc_vec_type >::serialize | ( | std::ostream & | out, |
structure_tree_node * | v = NULL , |
||
std::string | name = "" |
||
) | const |
Serialize to a stream.
out | Outstream to write the data structure. |
size_type sdsl::lcp_vlc< vlc_vec_type >::size | ( | ) | const [inline] |
void sdsl::lcp_vlc< vlc_vec_type >::swap | ( | lcp_vlc< vlc_vec_type > & | lcp_c | ) |
Swap method for lcp_vlc.
The swap method can be defined in terms of assignment. This requires three assignments, each of which, for a container type, is linear in the container's size. In a sense, then, a.swap(b) is redundant. This implementation guaranties a run-time complexity that is constant rather than linear.
lcp_c | lcp_vlc to swap. |
Required for the Assignable Conecpt of the STL.