Thrill
0.1
|
Objectified string array pointer and shadow pointer array for out-of-place swapping of pointers.
Definition at line 40 of file string_ptr.hpp.
#include <string_ptr.hpp>
Public Types | |
typedef StringSet::Iterator | Iterator |
typedef LcpType_ | LcpType |
typedef StringSet::String | String |
typedef StringSet_ | StringSet |
Public Member Functions | |
StringShadowLcpPtr (const StringSet &original, const StringSet &shadow, LcpType *lcp, bool flipped=false) | |
constructor specifying all attributes More... | |
const StringSet & | active () const |
return currently active array More... | |
StringShadowLcpPtr | copy_back () const |
void | fill_lcp (const LcpType &v) const |
fill entire LCP array with v, excluding the first lcp[0] position! More... | |
StringShadowLcpPtr | flip (size_t offset, size_t sub_size) const |
bool | flipped () const |
true if flipped to back array More... | |
LcpType | get_lcp (size_t i) const |
return LCP array value More... | |
LcpType * | lcp () 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... | |
const StringSet & | shadow () const |
return current shadow array More... | |
size_t | size () const |
return valid length More... | |
StringShadowLcpPtr | sub (size_t offset, size_t sub_size) const |
Advance (both) pointers by given offset, return sub-array without flip. More... | |
Static Public Attributes | |
static const bool | with_lcp = true |
if we want to save the LCPs More... | |
Protected Attributes | |
StringSet | active_ |
strings (front) and temporary shadow (back) array More... | |
bool | flipped_ |
false if active_ is original, true if shadow_ is original More... | |
LcpType * | lcp_ |
lcp array More... | |
StringSet | shadow_ |
typedef StringSet::Iterator Iterator |
Definition at line 253 of file string_ptr.hpp.
typedef LcpType_ LcpType |
Definition at line 251 of file string_ptr.hpp.
typedef StringSet::String String |
Definition at line 252 of file string_ptr.hpp.
typedef StringSet_ StringSet |
Definition at line 250 of file string_ptr.hpp.
|
inline |
constructor specifying all attributes
Definition at line 267 of file string_ptr.hpp.
|
inline |
return currently active array
Definition at line 272 of file string_ptr.hpp.
References StringPtr< StringSet_ >::active_.
|
inline |
return subarray pointer to n strings in original array, might copy from shadow before returning.
Definition at line 302 of file string_ptr.hpp.
|
inline |
fill entire LCP array with v, excluding the first lcp[0] position!
Definition at line 333 of file string_ptr.hpp.
References StringPtr< StringSet_ >::set_lcp(), and StringPtr< StringSet_ >::size().
|
inline |
construct a StringShadowLcpPtr object specifying a sub-array with flipping to other array.
Definition at line 293 of file string_ptr.hpp.
References StringPtr< StringSet_ >::size().
|
inline |
true if flipped to back array
Definition at line 278 of file string_ptr.hpp.
|
inline |
return LCP array value
Definition at line 321 of file string_ptr.hpp.
References StringPtr< StringSet_ >::size().
|
inline |
return LCP array pointer
Definition at line 316 of file string_ptr.hpp.
|
inline |
set the i-th lcp to v and check its value
Definition at line 327 of file string_ptr.hpp.
References StringPtr< StringSet_ >::size().
|
inline |
return current shadow array
Definition at line 275 of file string_ptr.hpp.
|
inline |
return valid length
Definition at line 281 of file string_ptr.hpp.
|
inline |
Advance (both) pointers by given offset, return sub-array without flip.
Definition at line 284 of file string_ptr.hpp.
References StringPtr< StringSet_ >::size().
|
protected |
strings (front) and temporary shadow (back) array
Definition at line 257 of file string_ptr.hpp.
|
protected |
false if active_ is original, true if shadow_ is original
Definition at line 263 of file string_ptr.hpp.
|
protected |
lcp array
Definition at line 260 of file string_ptr.hpp.
|
protected |
Definition at line 257 of file string_ptr.hpp.
|
static |
if we want to save the LCPs
Definition at line 313 of file string_ptr.hpp.