Thrill  0.1
StringLcpPtr< StringSet_, LcpType_ > Class Template Reference

Detailed Description

template<typename StringSet_, typename LcpType_>
class tlx::sort_strings_detail::StringLcpPtr< StringSet_, LcpType_ >

Objectified string and LCP array pointer arrays.

Definition at line 97 of file string_ptr.hpp.

#include <string_ptr.hpp>

Public Types

typedef LcpType_ LcpType
 
typedef StringSet::String String
 
typedef StringSet_ StringSet
 
typedef StringShadowLcpPtr< StringSet_, LcpType_ > WithShadow
 objectified string and shadow pointer class More...
 

Public Member Functions

 StringLcpPtr (const StringSet &ss, LcpType *lcp)
 constructor specifying all attributes More...
 
const StringSetactive () const
 return currently active array More...
 
WithShadow add_shadow (const StringSet &shadow) const
 construct objectified string and shadow pointer class More...
 
void fill_lcp (const LcpType &v) const
 fill entire LCP array with v, excluding the first lcp[0] position! More...
 
LcpType get_lcp (size_t i) const
 return LCP array value More...
 
LcpTypelcp () const
 return LCP array pointer More...
 
void set_lcp (size_t i, const LcpType &v) const
 set the i-th lcp to v and check its value More...
 
size_t size () const
 return valid length More...
 
StringLcpPtr sub (size_t offset, size_t sub_size) const
 Advance (both) pointers by given offset, return sub-array. More...
 

Static Public Attributes

static const bool with_lcp = true
 if we want to save the LCPs More...
 

Protected Attributes

StringSet active_
 strings (front) array More...
 
LcpTypelcp_
 lcp array More...
 

Member Typedef Documentation

◆ LcpType

typedef LcpType_ LcpType

Definition at line 101 of file string_ptr.hpp.

◆ String

typedef StringSet::String String

Definition at line 102 of file string_ptr.hpp.

◆ StringSet

typedef StringSet_ StringSet

Definition at line 100 of file string_ptr.hpp.

◆ WithShadow

typedef StringShadowLcpPtr<StringSet_, LcpType_> WithShadow

objectified string and shadow pointer class

Definition at line 156 of file string_ptr.hpp.

Constructor & Destructor Documentation

◆ StringLcpPtr()

StringLcpPtr ( const StringSet ss,
LcpType lcp 
)
inline

constructor specifying all attributes

Definition at line 113 of file string_ptr.hpp.

Member Function Documentation

◆ active()

const StringSet& active ( ) const
inline

return currently active array

Definition at line 117 of file string_ptr.hpp.

References StringPtr< StringSet_ >::active_.

◆ add_shadow()

StringShadowLcpPtr< StringSet_, LcpType_ > add_shadow ( const StringSet shadow) const

construct objectified string and shadow pointer class

Definition at line 349 of file string_ptr.hpp.

References StringPtr< StringSet_ >::active_.

◆ fill_lcp()

void fill_lcp ( const LcpType v) const
inline

fill entire LCP array with v, excluding the first lcp[0] position!

Definition at line 150 of file string_ptr.hpp.

References StringPtr< StringSet_ >::set_lcp(), and StringPtr< StringSet_ >::size().

◆ get_lcp()

LcpType get_lcp ( size_t  i) const
inline

return LCP array value

Definition at line 138 of file string_ptr.hpp.

References StringPtr< StringSet_ >::size().

◆ lcp()

LcpType* lcp ( ) const
inline

return LCP array pointer

Definition at line 133 of file string_ptr.hpp.

◆ set_lcp()

void set_lcp ( size_t  i,
const LcpType v 
) const
inline

set the i-th lcp to v and check its value

Definition at line 144 of file string_ptr.hpp.

References StringPtr< StringSet_ >::size().

◆ size()

size_t size ( ) const
inline

return valid length

Definition at line 120 of file string_ptr.hpp.

◆ sub()

StringLcpPtr sub ( size_t  offset,
size_t  sub_size 
) const
inline

Advance (both) pointers by given offset, return sub-array.

Definition at line 123 of file string_ptr.hpp.

References StringPtr< StringSet_ >::size().

Member Data Documentation

◆ active_

StringSet active_
protected

strings (front) array

Definition at line 106 of file string_ptr.hpp.

◆ lcp_

LcpType* lcp_
protected

lcp array

Definition at line 109 of file string_ptr.hpp.

◆ with_lcp

const bool with_lcp = true
static

if we want to save the LCPs

Definition at line 130 of file string_ptr.hpp.


The documentation for this class was generated from the following file: