fn() sum
Returns the sum of all elements in a sequence.

Defined in <seqan/parallel.h>
Signature TValue sum(seq[, parallelTag]);


seq The sequence to sum up, o ftype TSequence.
parallelTag Tag to enable/disable parallelism, one of Serial and Parallel, default is Serial.

Return Values

TValue The sum of the elements in seq, of type Value<TSequence>::Type.

Detailed Description

The sequence alphabet must support the operator+ and conversion from zero.

See Also