Tight Dependent StringSet - SeqAn API Documentation

# Spec Tight Dependent StringSet
Very space efficient Dependent StringSet implementation.

Extends | DependentStringSet
All Extended | DependentStringSet, StringSet
All Impl'd | AssignableConcept, ContainerConcept, DestructibleConcept, ForwardContainerConcept, RandomAccessContainerConcept, ReversibleContainerConcept, SegmentableConcept, StringConcept, TextConcept
Defined in | <seqan/sequence.h>
Signature | `template <typename TString> class StringSet<TString, Depedent<Tight> >;`

## Template Parameters

`TString` | The type of the string to store in the string set.

## Member Function Overview

### Member Functions Inherited From AssignableConcept

- `operator=`

### Member Functions Inherited From RandomAccessContainerConcept

- `operator[]`

## Interface Function Overview

### Interface Functions Inherited From StringSet

- `assignValue`
- `assignValueById`
- `clear`
- `concat`
- `getValueById`
- `idToPosition`
- `lengthSum`
- `positionToId`
- `removeValueById`
- `reserve`
- `strSplit`
- `valueById`

### Interface Functions Inherited From AssignableConcept

- `assign`
- `set`
- `move`

### Interface Functions Inherited From ContainerConcept

- `begin`
- `end`
- `length`
- `empty`
- `swap`
- `writeValue`
- `write`
- `getObjectId`
- `moveValue`
- `append`
- `appendValue`
- `shrinkToFit`
- `directionIterator`

### Interface Functions Inherited From RandomAccessContainerConcept

- `value`
- `assignValue`
- `getValue`

### Interface Functions Inherited From SegmentableConcept

- `prefix`
- `infixWithLength`
- `infix`
- `suffix`

### Interface Functions Inherited From StringConcept

- `iter`
- `append`
- `appendValue`
- `front`
- `back`
- `resize`
- `clear`
- `erase`
- `eraseFront`
- `eraseBack`
- `capacity`
- `computeGenerousCapacity`
- `insert`
- `insertValue`
- `replace`

### Interface Functions Inherited From TextConcept

- `stringSetLimits`
- `posLocalToX`
- `posLocalize`
- `posGlobalize`
- `getSeqNo`
- `getSeqOffset`

## Interface Metafunction Overview

### Interface Metafunctions Inherited From StringSet

- `Concatenator`
- `GetSequenceByNo`
- `Id`
- `LengthSum`
- `StringSetPosition`

### Interface Metafunctions Inherited From ContainerConcept

- `DefaultGetIteratorSpec`
- `DefaultIteratorSpec`
- `Difference`
- `DirectionIterator`
- `GetValue`
- `Iterator`
- `Position`
- `Reference`
- `Size`
- `Value`

### Interface Metafunctions Inherited From SegmentableConcept

- `Infix`
- `Prefix`
- `Suffix`

### Interface Metafunctions Inherited From TextConcept

- `SAValue`
- `StringSetLimits`

## Detailed Description

The Tight Dependent StringSet stores pointers to a source set, enabling the user to perform deletions and additions to the set without changing the original source set (See DependentStringSet for further details).

### Run time and Memory

When a value is removed from the Tight Dependent StringSet, the array of pointers is resized accordingly. Therefore, in order to call sequences by id or position, the stringset keeps a id-to-position map, which affects the run time complexity of the following functions:

- value() or operator []: O(1)

- getValueById(): O(log(n))

- removeValueById(): O(log(n))

The memory consumption is linear to the number of pointers.

See GenerousDependentStringSet for a Dependent StringSet implementation that allows for more efficient access to strings in the container via ids at the cost of higher memory usage.

### Accessing non-existing entries results in undefined behaviour

Because the Tight Dependent StringSet keeps every array "tight", every entry that is being removed, is actually deleted (in contrast to `Generous`) and accessing it will result in undefined behaviour.

#### Dox Sources

    /*!
     * @class TightDependentStringSet Tight Dependent StringSet
     *
     * @extends DependentStringSet
     *
     * @headerfile <seqan/sequence.h>
     *
     * @brief Very space efficient Dependent StringSet implementation.
     *
     * @signature template <typename TString> class StringSet<TString,
     *            Depedent<Tight> >;
     *
     * @tparam TString The type of the string to store in the string set.
     *
     * The Tight Dependent StringSet stores pointers to a source set, enabling the
     * user to perform deletions and additions to the set without changing the
     * original source set (See @link DependentStringSet @endlink for further
     * details).
     *
     * @section Run time and Memory
     *
     * When a value is removed from the Tight Dependent StringSet, the array of
     * pointers is resized accordingly. Therefore, in order to call sequences by id
     * or position, the stringset keeps a id-to-position map, which affects the run
     * time complexity of the following functions:
     *
     * - value() or operator []: O(1)
     *
     * - getValueById(): O(log(n))
     *
     * - removeValueById(): O(log(n))
     *
     * The memory consumption is linear to the number of pointers.
     *
     * See @link GenerousDependentStringSet @endlink for a Dependent StringSet
     * implementation that allows for more efficient access to strings in the
     * container via ids at the cost of higher memory usage.
     *
     * @section Accessing non-existing entries results in undefined behaviour
     *
     * Because the Tight Dependent StringSet keeps every array "tight", every entry
     * that is being removed, is actually deleted (in contrast to <tt>Generous</tt>)
     * and accessing it will result in undefined behaviour.
     */