# Spec ChainedSeed
Describes a seed with start and end position2 and diagonal upper and lower bounds.

Extends | Seed
Implements | ContainerConcept
All Extended | Seed
All Impl'd | AssignableConcept, ContainerConcept, DestructibleConcept
Defined in | <seqan/seeds.h>
Signature | `template <[typename TConfig]> class Seed<ChainedSeed, TConfig>;`

## Template Parameters

`TConfig` | The configuration to use for the chained seed specialization. Defaults to DefaultSeedConfig.

## Member Function Overview

- `Seed::Seed();, Seed::Seed(beginPosH, beginPosV, length);`
  Constructor

### Member Functions Inherited From AssignableConcept

- `operator=`

## Interface Function Overview

- `void appendSeed(seed, diagonal);`
  Adds a digional to a ChainedSeed.
- `TReference back(seed);`
  Returns a reference to the ChainedSeed diagonal.
- `TIter begin(seed[, tag]);`
  Returns an iterator to the beginning of the ChainedSeed's diagonals.
- `TIter end(seed[, tag]);`
  Returns an iterator to the end of the ChainedSeed's diagonals.
- `TReference front(seed);`
  Returns a reference to the first ChainedSeed diagonal.
- `TSize length(seed);`
  Returns the number of diagonals in the ChainedSeed.
- `void truncateDiagonals(seed, first);`
  Removes diagonals from the given first one to the end of the seed's diagonals.

### Interface Functions Inherited From Seed

- `beginDiagonal`
- `beginPositionH`
- `beginPositionV`
- `endDiagonal`
- `endPositionH`
- `endPositionV`
- `extendSeed`
- `lowerDiagonal`
- `score`
- `seedSize`
- `setBeginPositionH`
- `setBeginPositionV`
- `setEndPositionH`
- `setEndPositionV`
- `setLowerDiagonal`
- `setScore`
- `setUpperDiagonal`
- `upperDiagonal`

### Interface Functions Inherited From AssignableConcept

- `assign`
- `set`
- `move`

### Interface Functions Inherited From ContainerConcept

- `begin`
- `end`
- `length`
- `empty`
- `swap`
- `writeValue`
- `write`
- `getObjectId`
- `moveValue`
- `append`
- `appendValue`
- `shrinkToFit`
- `directionIterator`

## Interface Metafunction Overview

- `Iterator<TChainedSeed[, Tag]>::Type;`
  The type for iterating over the diagonals in a seed.
- `Reference<TChainedSeed>::Type;`
  Reference to the seed diagonal type.
- `Value<TChainedSeed>::Type;`
  The type of the diagonals in the ChainedSeed.

### Interface Metafunctions Inherited From Seed

- `Diagonal`
- `Position`
- `SeedScore`
- `Size`

### Interface Metafunctions Inherited From ContainerConcept

- `DefaultGetIteratorSpec`
- `DefaultIteratorSpec`
- `Difference`
- `DirectionIterator`
- `GetValue`
- `Iterator`
- `Position`
- `Reference`
- `Size`
- `Value`

## Detailed Description

Diagonals are stored as SeedDiagonal objects.

## Member Functions Detail

### `Seed::Seed(); Seed::Seed(beginPosH, beginPosV, length);`

Constructor

#### Parameters

`beginPosH` | Begin position in dat abase (horizontal).
`beginPosV` | Begin position in query (vertical).
`length` | The length of the seed.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

## Interface Functions Detail

### `void appendSeed(seed, diagonal);`

Adds a digional to a ChainedSeed.

#### Parameters

`seed` | The ChainedSeed to which the digonal should be added.
`diagonal` | The SeedDiagional to add to `seed`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `TReference back(seed);`

Returns a reference to the ChainedSeed diagonal.

#### Parameters

`seed` | The ChainedSeed to query.

#### Returns

`TReference` | Reference to the last ChainedSeed diagonal. TReference is the reference type of `seed`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `TIter begin(seed[, tag]);`

Returns an iterator to the beginning of the ChainedSeed's diagonals.

#### Parameters

`seed` | The ChainedSeed to the begin iterator for.
`tag` | A tag for selecting the type of the iterator, one of `Standard` and `Rooted`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `TIter end(seed[, tag]);`

Returns an iterator to the end of the ChainedSeed's diagonals.

#### Parameters

`seed` | The ChainedSeed to the end iterator for.
`tag` | A tag for selecting the type of the iterator, one of `Standard` and `Rooted`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `TReference front(seed);`

Returns a reference to the first ChainedSeed diagonal.

#### Parameters

`seed` | The ChainedSeed to query.

#### Returns

`TReference` | Reference to first ChainedSeed diagonal. TReference is the reference type of `seed`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `TSize length(seed);`

Returns the number of diagonals in the ChainedSeed.

#### Parameters

`seed` | The ChainedSeed to query for its number of diagonals.

#### Returns

`TSize` | The number of diagonals in the ChainedSeed. TSize is the Size type of `seed`

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `void truncateDiagonals(seed, first);`

Removes diagonals from the given first one to the end of the seed's diagonals.

#### Parameters

`seed` | The ChainedSeed to truncate diagonals from.
`first` | An iterator into the ChainedSeed, as returned by Iterator.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

## Interface Metafunctions Detail

### `Iterator<TChainedSeed[, Tag]>::Type;`

The type for iterating over the diagonals in a seed.

#### Template Parameters

`TChainedSeed` | The seed to query for the diagonal iterator type.
`Tag` | The tag to select the iterator with. One of `Standard` and `Rooted`.

#### Returns

`Type` | Reference to the contained seeds.

### `Reference<TChainedSeed>::Type;`

Reference to the seed diagonal type.

#### Template Parameters

`TChainedSeed` | The seed to query for the reference to diagonal values.

#### Returns

`Type` | Reference to the contained seeds.

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

The type of the diagonals in the ChainedSeed.

#### Template Parameters

`TChainedSeed` | The seed to query for its diagonal object type.

#### Returns

`Type` | The resulting diagonal seed.

#### Dox Sources

    /*!
     * @class ChainedSeed
     *
     * @implements ContainerConcept
     *
     * @extends Seed
     *
     * @headerfile <seqan/seeds.h>
     *
     * @brief Describes a seed with start and end position2 and diagonal upper and
     *        lower bounds.
     *
     * @signature template <[typename TConfig]> class Seed<ChainedSeed, TConfig>;
     *
     * @tparam TConfig The configuration to use for the chained seed specialization.
     *                 Defaults to @link DefaultSeedConfig @endlink.
     *
     * Diagonals are stored as @link SeedDiagonal @endlink objects.
     *
     * @mfn ChainedSeed#Value
     *
     * @brief The type of the diagonals in the ChainedSeed.
     *
     * @signature Value<TChainedSeed>::Type;
     *
     * @tparam TChainedSeed The seed to query for its diagonal object type.
     *
     * @return Type The resulting diagonal seed.
     *
     * @mfn ChainedSeed#Reference
     *
     * @brief Reference to the seed diagonal type.
     *
     * @signature Reference<TChainedSeed>::Type;
     *
     * @tparam TChainedSeed The seed to query for the reference to diagonal values.
     *
     * @return Type Reference to the contained seeds.
     *
     * @mfn ChainedSeed#Iterator
     *
     * @brief The type for iterating over the diagonals in a seed.
     *
     * @signature Iterator<TChainedSeed[, Tag]>::Type;
     *
     * @tparam TChainedSeed The seed to query for the diagonal iterator type.
     * @tparam Tag The tag to select the iterator with. One of <tt>Standard</tt> and
     *             <tt>Rooted</tt>.
     *
     * @return Type Reference to the contained seeds.
     *
     * @fn ChainedSeed::Seed
     *
     * @brief Constructor
     *
     * @signature Seed::Seed();
     * @signature Seed::Seed(beginPosH, beginPosV, length);
     *
     * @param[in] beginPosH Begin position in dat abase (horizontal).
     * @param[in] beginPosV Begin position in query (vertical).
     * @param[in] length The length of the seed.
     *
     * @fn ChainedSeed#length
     *
     * @brief Returns the number of diagonals in the ChainedSeed.
     *
     * @signature TSize length(seed);
     *
     * @param[in] seed The ChainedSeed to query for its number of diagonals.
     *
     * @return TSize The number of diagonals in the ChainedSeed. TSize is the @link
     *               ContainerConcept#Size @endlink type of <tt>seed</tt>
     *
     * @fn ChainedSeed#appendDiagonal
     *
     * @brief Adds a digional to a ChainedSeed.
     *
     * @signature void appendSeed(seed, diagonal);
     *
     * @param[in,out] seed The ChainedSeed to which the digonal should be added.
     * @param[in] diagonal The SeedDiagional to add to <tt>seed</tt>.
     *
     * @fn ChainedSeed#truncateDiagonals
     *
     * @brief Removes diagonals from the given first one to the end of the seed's
     *        diagonals.
     *
     * @signature void truncateDiagonals(seed, first);
     *
     * @param[in,out] seed The ChainedSeed to truncate diagonals from.
     * @param[in] first An iterator into the ChainedSeed, as returned by @link
     *                  ChainedSeed#Iterator @endlink.
     *
     * @fn ChainedSeed#begin
     *
     * @brief Returns an iterator to the beginning of the ChainedSeed's diagonals.
     *
     * @signature TIter begin(seed[, tag]);
     *
     * @param[in] seed The ChainedSeed to the begin iterator for.
     * @param[in] tag A tag for selecting the type of the iterator, one of
     *                <tt>Standard</tt> and <tt>Rooted</tt>.
     *
     * @fn ChainedSeed#end
     *
     * @brief Returns an iterator to the end of the ChainedSeed's diagonals.
     *
     * @signature TIter end(seed[, tag]);
     *
     * @param[in] seed The ChainedSeed to the end iterator for.
     * @param[in] tag A tag for selecting the type of the iterator, one of
     *                <tt>Standard</tt> and <tt>Rooted</tt>.
     *
     * @fn ChainedSeed#front
     *
     * @brief Returns a reference to the first ChainedSeed diagonal.
     *
     * @signature TReference front(seed);
     *
     * @param[in] seed The ChainedSeed to query.
     *
     * @return TReference Reference to first ChainedSeed diagonal. TReference is the
     *                    reference type of <tt>seed</tt>.
     *
     * @fn ChainedSeed#back
     *
     * @brief Returns a reference to the ChainedSeed diagonal.
     *
     * @signature TReference back(seed);
     *
     * @param[in] seed The ChainedSeed to query.
     *
     * @return TReference Reference to the last ChainedSeed diagonal. TReference is
     *                    the reference type of <tt>seed</tt>.
     */