Generous Dependent StringSet - SeqAn API Documentation

# Spec Generous Dependent StringSet
Dependent StringSet implementation with efficient sequence access by sequence id.

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<Generous> >;`

## 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

- `writeValue`
- `write`
- `begin`
- `end`
- `length`
- `empty`
- `swap`
- `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 Generous 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 Generous Dependent StringSet, the pointer is simply set to zero. The only exception applies to zero pointers at the end of the pointer array, which are removed by resizing the array step by step. This results into the following run time complexity:

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

- getValueById(): O(1)

- removeValueById(): amortised O(1)

The memory consumption is linear to the number of pointers but potentially stores a lot of unneccessary null pointers.

See TightDependentStringSet for a Dependent StringSet implementation with a more memory efficient representation at higher costs for by-id element access.

### Accessing non-existing entries returns empty string

This also applies for accessing a position behind the last element.

#### Dox Sources

    /*!
     * @class GenerousDependentStringSet Generous Dependent StringSet
     *
     * @extends DependentStringSet
     *
     * @headerfile <seqan/sequence.h>
     *
     * @brief Dependent StringSet implementation with efficient sequence access by
     *        sequence id.
     *
     * @signature template <typename TString> class StringSet<TString,
     *            Depedent<Generous> >;
     *
     * @tparam TString The type of the string to store in the string set.
     *
     * The Generous 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 Generous Dependent StringSet, the pointer is
     * simply set to zero. The only exception applies to zero pointers at the end of
     * the pointer array, which are removed by resizing the array step by step. This
     * results into the following run time complexity:
     *
     * - value() or operator []: amortised O(1)
     *
     * - getValueById(): O(1)
     *
     * - removeValueById(): amortised O(1)
     *
     * The memory consumption is linear to the number of pointers but potentially
     * stores a lot of unneccessary null pointers.
     *
     * See @link TightDependentStringSet @endlink for a Dependent StringSet
     * implementation with a more memory efficient representation at higher costs
     * for by-id element access.
     *
     * @section Accessing non-existing entries returns empty string
     *
     * This also applies for accessing a position behind the last element.
     */