Spec
Generous Dependent StringSetDependent 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
Member Functions Inherited From RandomAccessContainerConcept
Interface Function Overview
Interface Functions Inherited From StringSet
assignValueassignValueByIdclearconcatgetValueByIdidToPositionlengthSumpositionToIdremoveValueByIdreservestrSplitvalueById
Interface Functions Inherited From AssignableConcept
Interface Functions Inherited From ContainerConcept
directionIteratorbeginendlengthemptyswapwriteValuewritegetObjectIdmoveValueappendappendValueshrinkToFit
Interface Functions Inherited From RandomAccessContainerConcept
Interface Functions Inherited From SegmentableConcept
Interface Functions Inherited From StringConcept
iterappendappendValuefrontbackresizecleareraseeraseFronteraseBackcapacitycomputeGenerousCapacityinsertinsertValuereplace
Interface Functions Inherited From TextConcept
Interface Metafunction Overview
Interface Metafunctions Inherited From StringSet
Interface Metafunctions Inherited From ContainerConcept
DefaultGetIteratorSpecDefaultIteratorSpecDifferenceDirectionIteratorGetValueIteratorPositionReferenceSizeValue
Interface Metafunctions Inherited From SegmentableConcept
Interface Metafunctions Inherited From TextConcept
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.