Pair - SeqAn API Documentation

# Class Pair
Store two arbitrary objects.

Implements | ComparableConcept
All Subcl's | BitPackedPair, PackedPair
All Impl'd | ComparableConcept, EqualityComparableConcept, LessThanComparableConcept
Defined in | <seqan/basic.h>
Signature | `template <typename T1, typename T2, typename TSpec> class Pair;`

## Template Parameters

`T1` | The type of the first member.
`T2` | The type of the second member.
`TSpec` | Tag used for the specialization.

## Member Function Overview

### Member Functions Inherited From ComparableConcept

- `operator>`

### Member Functions Inherited From EqualityComparableConcept

- `operator!=`
- `operator==`

### Member Functions Inherited From LessThanComparableConcept

- `operator<`

## Interface Function Overview

- `void assignValueI1(pair, val);`
  Set first entry of a pair.
- `void assignValueI2(pair, val);`
  Set second entry of a pair.
- `T1 getValueI1(pair);`
  The get-value of the Pair's first entry.
- `T2 getValueI2(pair);`
  The get-value of the Pair's second entry.
- `Pair::Pair();, Pair::Pair(other);, Pair::Pair(x1, x2);`
  Default and copy construction and construction for two values.
- `void setValueI1(pair, val);`
  Set first entry of a pair.
- `void setValueI2(pair, val);`
  Set second entry of a pair.

### Interface Functions Inherited From ComparableConcept

- `operator<=`
- `operator>=`

## Interface Metafunction Overview

- `LENGTH<TPair>::VALUE;`
  Return number of members in a Pair (2).
- `Spec<TPair>::Type;`
  Return specialization tag.
- `Value<TTuple, I>::Type;`
  Return type of the i-th value.

## Member Variable Overview

- `T1 Pair::i1`
  First member
- `T2 Pair::i2`
  Second member

## Interface Functions Detail

### `void assignValueI1(pair, val);`

Set first entry of a pair.

#### Parameters

`pair` | The pair to get entry from.
`val` | Set the value of the Pair's first entry.

#### Data Races

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

### `void assignValueI2(pair, val);`

Set second entry of a pair.

#### Parameters

`pair` | The pair to get entry from.
`val` | Set the value of the Pair's second entry.

#### Data Races

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

### `T1 getValueI1(pair);`

The get-value of the Pair's first entry.

#### Parameters

`pair` | The pair to get entry from.

#### Returns

`T1` | The first entry of the Pair.

#### Data Races

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

### `T2 getValueI2(pair);`

The get-value of the Pair's second entry.

#### Parameters

`pair` | The pair to get entry from.

#### Returns

`T2` | The second entry of the Pair.

#### Data Races

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

### `Pair::Pair(); Pair::Pair(other); Pair::Pair(x1, x2);`

Default and copy construction and construction for two values.

#### Parameters

`other` | The other Pair object to copy from.
`x1` | Copied to first member.
`x2` | Copied to second member

#### Data Races

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

### `void setValueI1(pair, val);`

Set first entry of a pair.

#### Parameters

`pair` | The pair to get entry from.
`val` | Set the value of the Pair's first entry.

#### Data Races

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

### `void setValueI2(pair, val);`

Set second entry of a pair.

#### Parameters

`pair` | The pair to get entry from.
`val` | Set the value of the Pair's second entry.

#### Data Races

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

## Interface Metafunctions Detail

### `LENGTH<TPair>::VALUE;`

Return number of members in a Pair (2).

#### Template Parameters

`TPair` | The Pair specialization.

#### Returns

`VALUE` | The number of element in a Pair (2).

### `Spec<TPair>::Type;`

Return specialization tag.

#### Template Parameters

`TPair` | The Pair specialization.

#### Returns

`Type` | The resulting type.

### `Value<TTuple, I>::Type;`

Return type of the i-th value.

#### Template Parameters

`TTuple` | Tuple specialization to get the type of.
`I` | The index of the member to get (1 or 2).

#### Returns

`Type` | Result type.

## Member Variables Detail

### `T1 Pair::i1`

First member

### `T2 Pair::i2`

Second member

#### Dox Sources

    /*!
     * @class Pair
     *
     * @implements ComparableConcept
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Store two arbitrary objects.
     *
     * @signature template <typename T1, typename T2, typename TSpec> class Pair;
     *
     * @tparam T1 The type of the first member.
     * @tparam T2 The type of the second member.
     * @tparam TSpec Tag used for the specialization.
     *
     * @mfn Pair#LENGTH
     *
     * @brief Return number of members in a Pair (2).
     *
     * @signature LENGTH<TPair>::VALUE;
     *
     * @tparam TPair The Pair specialization.
     *
     * @return VALUE The number of element in a Pair (2).
     *
     * @mfn Pair#Value
     *
     * @brief Return type of the i-th value.
     *
     * @signature Value<TTuple, I>::Type;
     *
     * @tparam TTuple Tuple specialization to get the type of.
     * @tparam I The index of the member to get (1 or 2).
     *
     * @return Type Result type.
     *
     * @mfn Pair#Spec
     *
     * @brief Return specialization tag.
     *
     * @signature Spec<TPair>::Type;
     *
     * @tparam TPair The Pair specialization.
     *
     * @return Type The resulting type.
     *
     * @var T1 Pair::i1;
     *
     * @brief First member
     *
     * @var T2 Pair::i2;
     *
     * @brief Second member
     *
     * @fn Pair#Pair
     *
     * @brief Default and copy construction and construction for two values.
     *
     * @signature Pair::Pair();
     * @signature Pair::Pair(other);
     * @signature Pair::Pair(x1, x2);
     *
     * @param[in] other The other Pair object to copy from.
     * @param[in] x1 Copied to first member.
     * @param[in] x2 Copied to second member
     *
     * @fn Pair#getValueI1
     *
     * @brief The get-value of the Pair's first entry.
     *
     * @signature T1 getValueI1(pair);
     *
     * @param[in] pair The pair to get entry from.
     *
     * @return T1 The first entry of the Pair.
     *
     * @fn Pair#getValueI2
     *
     * @brief The get-value of the Pair's second entry.
     *
     * @signature T2 getValueI2(pair);
     *
     * @param[in] pair The pair to get entry from.
     *
     * @return T2 The second entry of the Pair.
     *
     * @fn Pair#assignValueI1
     *
     * @brief Set first entry of a pair.
     *
     * @signature void assignValueI1(pair, val);
     *
     * @param[in] pair The pair to get entry from.
     * @param[in] val Set the value of the Pair's first entry.
     *
     * @fn Pair#assignValueI2
     *
     * @brief Set second entry of a pair.
     *
     * @signature void assignValueI2(pair, val);
     *
     * @param[in] pair The pair to get entry from.
     * @param[in] val Set the value of the Pair's second entry.
     *
     * @fn Pair#setValueI1
     *
     * @brief Set first entry of a pair.
     *
     * @signature void setValueI1(pair, val);
     *
     * @param[in] pair The pair to get entry from.
     * @param[in] val Set the value of the Pair's first entry.
     *
     * @fn Pair#setValueI2
     *
     * @brief Set second entry of a pair.
     *
     * @signature void setValueI2(pair, val);
     *
     * @param[in] pair The pair to get entry from.
     * @param[in] val Set the value of the Pair's second entry.
     */