Concept SequenceConcept
Sequences are dense linear containers that have positions.

Extends RandomAccessContainerConcept
All Extended AssignableConcept, ContainerConcept, DestructibleConcept, ForwardContainerConcept, RandomAccessContainerConcept, ReversibleContainerConcept
Defined in <seqan/basic.h>
Signature SequenceConcept<T>

Member Function Overview

Member Functions Inherited From AssignableConcept

Member Functions Inherited From RandomAccessContainerConcept

Interface Function Overview

Interface Functions Inherited From AssignableConcept

Interface Functions Inherited From ContainerConcept

Interface Functions Inherited From RandomAccessContainerConcept

Interface Metafunction Overview

Interface Metafunctions Inherited From ContainerConcept

Interface Functions Detail

void append(seq, other);

Append a sequence to another one.

Parameters

seq The sequence to append the other sequence to.
other The other sequence to append to seq. Of same type as seq.

void appendValue(seq, val);

Append a value to a sequence.

Parameters

seq The sequence to append a value to (type TSequence).
val A value to append to the sequence. Convertible to Value<TSequence>::Type.

TReference back(seq);

Return reference to the last element.

Parameters

seq The sequence to get the last element of.

Returns

TReference A reference to the last element of seq.

TSize capacity(seq);

Returns the capacity of a sequence.

Parameters

seq The sequence to query for its capacity.

Returns

TSize Returns the capacity of the sequence. TSize is the result of Size<TSequence>::type where TSequence is the type of seq.

The size of a sequence can never exceed its capacity but some container support resizing of the capacity. Some functions do that implicitely if they are called with a suitable tag. The function reserve can be used to change the capacity explicitely.

void clear(seq);

Remove all elements from the sequences.

Parameters

seq Sequence to clear.

TSize computeGenerousCapacity(seq, capacity);

Capacity for generous expansion.

Parameters

seq The sequence to compute the generous capacity for.
capacity The minimal required capacity.

Returns

TSize A value larger than capacity that should be used as the new capacity for container when it is expanded using the Generous overflow strategy.

void erase(seq, pos[, posEnd)

Erase an element or a range of elements from a sequence.

Parameters

seq Sequence to remove range from.
pos Begin position of the range to remove.
posEnd Optional end position of the range to remove. If omitted, pos + 1 is used.

void eraseBack(seq);

Erase last element in a sequence.

Parameters

seq The sequence to remove the last element from.

void eraseFront(seq);

Erase first element in a sequence.

Parameters

seq The sequence to remove the first element from.

TReference front(seq);

Return reference to the first element.

Parameters

seq The sequence to get the first element of.

Returns

TReference A reference to the first element of seq.

void insert(seq, pos, src[, tag]);

Inserts a sequence into another sequence.

Parameters

seq The sequence to insert element sinto.
pos The position to start inserting at.
src The sequence to insert at pos.
tag The resize tag, defaults to what OverflowStrategyImplicit returns.

void insertValue(seq, pos, val[, tag]);

Inserts an element into a sequence.

Parameters

seq The sequence to insert element into.
pos The position to insert at.
val The value to insert at pos into seq.
tag The resize tag, defaults to what OverflowStrategyImplicit returns.

TIterator iter(seq, pos[, tag]);

Iterator to the item at the given position in a container.

Parameters

seq The sequence to get the iterator for.
pos The position to get the iterator for.
tag The tag to pick the type of the iterator.

Returns

TIterator The resulting iterator. If TTag is the type of tag and TSequence the type of seq then TIterator is of the type Iterator<TSequence, TTag>::Type.

Remarks

If pos is out of range then the iterator is invalid.

void replace(target, posBegin, posEnd, source[, limit][, resizeTag]);

Replaces a part of a sequence with another sequence.

Parameters

target The sequence to modify.
posBegin The begin position of the range to replace.
posEnd The end position of the range to replace.
source The source sequence to replace [posBegin, posEnd) with.
limit Largest size of target after the operation.
resizeTag Specify the resizing behaviour. Defaults to what DefaultOverflowImplicit returns.

void resize(seq, len[, val]);

Resize a sequence.

Parameters

seq Sequence to resize.
len Length to resize seq to.
val When increasing the size, val is used to fill new entries. When omitted, TValue() is used where TValue is the Value type of the sequence.

Interface Metafunctions Detail

Infix<TSequence>::Type

Returns the infix type for a sequence.

Template Parameters

TSequence The type for getting the infix type of.

Returns

Type The infix type for TSequence.

Prefix<TSequence>::Type

Returns the prefix type for a sequence.

Template Parameters

TSequence The type for getting the prefix type of.

Returns

Type The prefix type for TSequence.

Suffix<TSequence>::Type

Returns the suffix type for a sequence.

Template Parameters

TSequence The type for getting the suffix type of.

Returns

Type The suffix type for TSequence.