SDSL: Succinct Data Structure Library
A C++ template library for succinct data structures
 All Classes Namespaces Files Functions Variables Typedefs Friends
Public Types | Public Member Functions
sdsl::psi_of_sa_and_isa< Csa > Class Template Reference

A helper class for the $\Psi$ function for (compressed) suffix arrays which provide also the inverse suffix array values (like sdsl::csa_uncompressed). More...

#include <suffixarray_helper.hpp>

List of all members.

Public Types

typedef Csa::value_type value_type
typedef Csa::size_type size_type
typedef Csa::difference_type difference_type
typedef
random_access_const_iterator
< psi_of_sa_and_isa
const_iterator

Public Member Functions

 psi_of_sa_and_isa (Csa *csa=NULL)
 Constructor.
 psi_of_sa_and_isa (const psi_of_sa_and_isa &csa)
value_type operator[] (size_type i) const
 Calculate the $\Psi$ value at position i.
value_type operator() (size_type i) const
 Calculate the LF mapping at position i.
psi_of_sa_and_isaoperator= (const psi_of_sa_and_isa &csa)
 Assignment operator.
bool operator== (const psi_of_sa_and_isa &psi) const
 Equality operator.
size_type size () const
 Returns the size of the $\Psi$ function.
size_type empty () const
 Returns if the $\Psi$ function is empty.
void swap (psi_of_sa_and_isa &psi)
 Swap operation require by the STL.
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.
uint32_t get_sample_dens () const

Detailed Description

template<class Csa>
class sdsl::psi_of_sa_and_isa< Csa >

A helper class for the $\Psi$ function for (compressed) suffix arrays which provide also the inverse suffix array values (like sdsl::csa_uncompressed).


Member Function Documentation

template<class Csa>
const_iterator sdsl::psi_of_sa_and_isa< Csa >::begin ( ) const [inline]

Returns a const_iterator to the first element.

Required for the STL Container Concept.

See also:
end
template<class Csa>
const_iterator sdsl::psi_of_sa_and_isa< Csa >::end ( ) const [inline]

Returns a const_iterator to the element after the last element.

Required for the STL Container Concept.

See also:
begin.
template<class Csa>
value_type sdsl::psi_of_sa_and_isa< Csa >::operator() ( size_type  i) const [inline]

Calculate the LF mapping at position i.

The LF mapping function is the inverse to the $\Psi$ function. That is $LF[\Psi(i)]=i$.

Parameters:
iThe index for which the LF value should be calculated, $i\in [0..size()-1]$.
template<class Csa>
bool sdsl::psi_of_sa_and_isa< Csa >::operator== ( const psi_of_sa_and_isa< Csa > &  psi) const [inline]

Equality operator.

return Always true, since all wrapper objects are equal only the reference to the supported csa differs.

template<class Csa>
value_type sdsl::psi_of_sa_and_isa< Csa >::operator[] ( size_type  i) const [inline]

Calculate the $\Psi$ value at position i.

   \param i The index for which the \form#6 value should be calculated, \form#105.
   \par Time complexity

$ \Order{\saaccess+\isaaccess} $


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