# Class Accumulator
Accumulator base class.

All Subcl's | AverageAccumulator
Defined in | <seqan/misc/accumulators.h>
Signature | `template <typename TValue, typename TSpec> struct Accumulator;`

## Template Parameters

`TSpec` | The specialization tag.
`TValue` | The type of the values to accumulate.

## Interface Function Overview

- `void clear(acc);`
  Clear the current accumulator state.
- `void push(acc, x);`
  Include value into sequence of values to accumulate.

## Interface Metafunction Overview

- `Result<TAccumulator>::Type;`
  Return the type for accumulation results.
- `Value<TAccumulator>::Type;`
  Return the type of the values to accumulate.

## Detailed Description

Accumulators are for computing statistics on streams of values.

Currently, this is only meant for accumulating integers.

## Interface Functions Detail

### `void clear(acc);`

Clear the current accumulator state.

#### Parameters

`acc` | The Accumulator to clear.

#### Data Races

Thread safety unknown!

### `void push(acc, x);`

Include value into sequence of values to accumulate.

#### Parameters

`acc` | The Accumulator to push the value to.
`x` | The value to include in the accumulation (IntegerConcept).

#### Data Races

Thread safety unknown!

## Interface Metafunctions Detail

### `Result<TAccumulator>::Type;`

Return the type for accumulation results.

#### Template Parameters

`TAccumulator` | The Accumulator type to query.

#### Returns

`Type` | The result type.

### `Value<TAccumulator>::Type;`

Return the type of the values to accumulate.

#### Template Parameters

`TAccumulator` | The Accumulator type to query.

#### Returns

`Type` | The value type.

#### Dox Sources

    /*!
     * @class Accumulator
     *
     * @headerfile <seqan/misc/accumulators.h>
     *
     * @brief Accumulator base class.
     *
     * @signature template <typename TValue, typename TSpec> struct Accumulator;
     *
     * @tparam TSpec The specialization tag.
     * @tparam TValue The type of the values to accumulate.
     *
     * Accumulators are for computing statistics on streams of values.
     *
     * Currently, this is only meant for accumulating integers.
     *
     * @mfn Accumulator#Value
     *
     * @brief Return the type of the values to accumulate.
     *
     * @signature Value<TAccumulator>::Type;
     *
     * @tparam TAccumulator The Accumulator type to query.
     *
     * @return Type The value type.
     *
     * @mfn Accumulator#Result
     *
     * @brief Return the type for accumulation results.
     *
     * @signature Result<TAccumulator>::Type;
     *
     * @tparam TAccumulator The Accumulator type to query.
     *
     * @return Type The result type.
     *
     * @fn Accumulator#push
     *
     * @brief Include value into sequence of values to accumulate.
     *
     * @signature void push(acc, x);
     *
     * @param[in,out] acc The Accumulator to push the value to.
     * @param[in] x The value to include in the accumulation (@link IntegerConcept
     *              @endlink).
     *
     * @fn Accumulator#clear
     *
     * @brief Clear the current accumulator state.
     *
     * @signature void clear(acc);
     *
     * @param[in,out] acc The Accumulator to clear.
     */