# Class DPBandConfig
Simple class to configure banded alignments.

Defined in | <seqan/align.h>
Signature | `template <typename TSwitch> class DPBandConfig<TSwitch>;`

## Template Parameters

`TSwitch` | Tag to switch between banded and unbanded alignments. One of DPBandSwitch. Defaults to BandOff.

## Member Function Overview

- `DPBandConfig<TSwitch>();, DPBandConfig<BandOn>(lowerDiag, upperDiag);`
  Constructor.

## Interface Function Overview

- `TSize bandSize(obj);`
  Returns the size of the band.
- `TPosition lowerDiagonal(obj);`
  Returns the value of the lower diagonal.
- `setLowerDiagonal(obj, val);`
  Sets the value of the lower diagonal.
- `setUpperDiagonal(obj, val);`
  Sets the value of the upper diagonal.
- `TPosition upperDiagonal(obj);`
  Returns the value of the upper diagonal.

## Interface Metafunction Overview

- `typename Position<T>::Type;`
  Metafunction returning the position type.
- `typename Size<T>::Type;`
  Metafunction returning the size type.

## Detailed Description

To compute banded alignments use DPBand as a shortcut for the `DPBandConfig` with band switched on.

## Member Functions Detail

### `DPBandConfig<TSwitch>(); DPBandConfig<BandOn>(lowerDiag, upperDiag);`

Constructor.

#### Template Parameters

`TSwitch` | Tag to switch between banded and unbanded alignments. One of DPBandSwitch. The second constructor is only supported when DPBandConfig is specialized with BandOn.

#### Parameters

`lowerDiag` | The value for the lower diagonal of the band.
`upperDiag` | The value for the upper diagonal of the band.

A negative value for the diagonals indicates an intersection of the diagonal with the vertical sequence (y-axis) and a positive value indicates an intersection with the horizontal sequence (x-axis). The value of the lower diagonal has to compare less or equal to the value of the upper diagonal.

#### Data Races

Thread safety unknown!

## Interface Functions Detail

### `TSize bandSize(obj);`

Note.

If the band is switched off this function always returns 0.

Returns the size of the band.

#### Parameters

`obj` | The object of type DPBandConfig to query the band size for.

#### Returns

`TSize` | The number of diagonals covered by the band.

#### Data Races

Thread safety unknown!

### `TPosition lowerDiagonal(obj);`

Note.

If the band is switched off this function always returns 0.

Returns the value of the lower diagonal.

#### Parameters

`obj` | The object of type DPBandConfig to query the lower diagonal for.

#### Returns

`TPosition` | The value of the lower diagonal.

#### Data Races

Thread safety unknown!

### `setLowerDiagonal(obj, val);`

Note.

If the band is switched off, this function defaults to no-op.

Sets the value of the lower diagonal.

#### Parameters

`obj` | The object of type DPBandConfig to set the lower diagonal for.
`val` | The new value for the lower diagonal.

#### Data Races

Thread safety unknown!

### `setUpperDiagonal(obj, val);`

Note.

If the band is switched off, this function defaults to no-op.

Sets the value of the upper diagonal.

#### Parameters

`obj` | The object of type DPBandConfig to set the upper diagonal for.
`val` | The new value for the upper diagonal.

#### Data Races

Thread safety unknown!

### `TPosition upperDiagonal(obj);`

Note.

If the band is switched off this function always returns 0.

Returns the value of the upper diagonal.

#### Parameters

`obj` | The object of type DPBandConfig to query the upper diagonal for.

#### Returns

`TPosition` | The value of the upper diagonal.

#### Data Races

Thread safety unknown!

## Interface Metafunctions Detail

### `typename Position<T>::Type;`

Metafunction returning the position type.

#### Template Parameters

`T` | The type DPBandConfig to query the position type for.

#### Returns

`TPosition` | The position type.

### `typename Size<T>::Type;`

Metafunction returning the size type.

#### Template Parameters

`T` | The type DPBandConfig to query the size type for.

#### Returns

`TSize` | The size type.

#### Dox Sources

    /*!
     * @class DPBandConfig
     *
     * @headerfile <seqan/align.h>
     *
     * @brief Simple class to configure banded alignments.
     *
     * @signature template <typename TSwitch> class DPBandConfig<TSwitch>;
     *
     * @tparam TSwitch Tag to switch between banded and unbanded alignments. One of
     *                 @link DPBandSwitch @endlink. Defaults to @link
     *                 DPBandSwitch#BandOff @endlink.
     *
     * To compute banded alignments use @link DPBand @endlink as a shortcut for the
     * <tt>DPBandConfig</tt> with band switched on.
     *
     * @mfn DPBandConfig#Position
     *
     * @headerfile <seqan/align.h>
     *
     * @brief Metafunction returning the position type.
     *
     * @signature typename Position<T>::Type;
     *
     * @tparam T The type @link DPBandConfig @endlink to query the position type
     *           for.
     *
     * @return TPosition The position type.
     *
     * @mfn DPBandConfig#Size
     *
     * @headerfile <seqan/align.h>
     *
     * @brief Metafunction returning the size type.
     *
     * @signature typename Size<T>::Type;
     *
     * @tparam T The type @link DPBandConfig @endlink to query the size type for.
     *
     * @return TSize The size type.
     *
     * @fn DPBandConfig::DPBandConfig
     *
     * @brief Constructor.
     *
     * @signature DPBandConfig<TSwitch>();
     * @signature DPBandConfig<BandOn>(lowerDiag, upperDiag);
     *
     * @tparam TSwitch Tag to switch between banded and unbanded alignments. One of
     *                 @link DPBandSwitch @endlink. The second constructor is only
     *                 supported when @link DPBandConfig @endlink is specialized
     *                 with @link DPBandSwitch#BandOn @endlink.
     *
     * @param lowerDiag The value for the lower diagonal of the band.
     * @param upperDiag The value for the upper diagonal of the band.
     *
     * A negative value for the diagonals indicates an intersection of the diagonal
     * with the vertical sequence (y-axis) and a positive value indicates an
     * intersection with the horizontal sequence (x-axis). The value of the lower
     * diagonal has to compare less or equal to the value of the upper diagonal.
     *
     * @fn DPBandConfig#setLowerDiagonal
     *
     * @headerfile <seqan/align.h>
     *
     * @brief Sets the value of the lower diagonal.
     *
     * @note If the band is switched off, this function defaults to no-op.
     *
     * @signature setLowerDiagonal(obj, val);
     *
     * @param obj The object of type @link DPBandConfig @endlink to set the lower
     *            diagonal for.
     * @param val The new value for the lower diagonal.
     *
     * @fn DPBandConfig#lowerDiagonal
     *
     * @headerfile <seqan/align.h>
     *
     * @brief Returns the value of the lower diagonal.
     *
     * @note If the band is switched off this function always returns 0.
     *
     * @signature TPosition lowerDiagonal(obj);
     *
     * @param obj The object of type @link DPBandConfig @endlink to query the lower
     *            diagonal for.
     *
     * @return TPosition The value of the lower diagonal.
     *
     * @fn DPBandConfig#setUpperDiagonal
     *
     * @headerfile <seqan/align.h>
     *
     * @brief Sets the value of the upper diagonal.
     *
     * @note If the band is switched off, this function defaults to no-op.
     *
     * @signature setUpperDiagonal(obj, val);
     *
     * @param obj The object of type @link DPBandConfig @endlink to set the upper
     *            diagonal for.
     * @param val The new value for the upper diagonal.
     *
     * @fn DPBandConfig#upperDiagonal
     *
     * @headerfile <seqan/align.h>
     *
     * @brief Returns the value of the upper diagonal.
     *
     * @note If the band is switched off this function always returns 0.
     *
     * @signature TPosition upperDiagonal(obj);
     *
     * @param obj The object of type @link DPBandConfig @endlink to query the upper
     *            diagonal for.
     *
     * @return TPosition The value of the upper diagonal.
     *
     * @fn DPBandConfig#bandSize
     *
     * @headerfile <seqan/align.h>
     *
     * @brief Returns the size of the band.
     *
     * @note If the band is switched off this function always returns 0.
     *
     * @signature TSize bandSize(obj);
     *
     * @param obj The object of type @link DPBandConfig @endlink to query the band
     *            size for.
     *
     * @return TSize The number of diagonals covered by the band.
     */