# Class EdgeStump
Encapsulate information for a single edge.

Defined in | <seqan/graph_types.h>
Signature | `template <typename TCargo, bool IS_LIST, bool STORE_SOURCE, bool STORE_ID, typename TSpec> class EdgeStump;`

## Template Parameters

`TCargo` | The cargo type of an edge. The cargo can be used to store arbitrary information with an edge or be `void`. Default: `void`.
`IS_LIST` | A bool value that indicates whether it is a list or not. Default: `true`.
`STORE_SOURCE` | A bool value that indicates whether the source is stored in the EdgeStump or not. Default: `false`.
`STORE_ID` | A bool value that indictes whether the id is tored in the EdgeStump or not. Note: Without edge ids, external property maps do not work for edges! Default: `true`.
`TSpec` | The specializing type. Default: `Default`.

## Interface Function Overview

- `void assignCargo(stump, cargo);`
  Assigns a new cargo to the edge.
- `void assignNextS(es, es2);`
  Assigns another EdgeStump to the next source pointer.
- `void assignNextT(es, es2);`
  Assigns another EdgeStump to the next target pointer.
- `void assignSource(stump, t);`
  Assigns a source vertex to an edge.
- `void assignTarget(stump, t);`
  Assigns a target vertex to an edge.
- `TCargo cargo(stump);`
  Return cargo for an EdgeStump.
- `TCargo getCargo(stump);`
  Return cargo for an EdgeStump.
- `TEdgeStump getNextS(es);`
  Accesses the next source pointer.
- `TEdgeStump getNextT(es);`
  Get method for the next target pointer.
- `TVertexDescriptor getSource(stump);`
  Get method for the source.
- `TVertexDescriptor getTarget(stump);`
  Get method for the target.
- `TEdgeStump nextS(es);`
  Accesses the next source pointer.
- `TEdgeStump nextT(es);`
  Accesses the next target pointer.
- `TVertexDescriptor source(stump);`
  Access to the source of an EdgeStump.
- `TVertexDescriptor target(stump);`
  Access to the target of an EdgeStump.

## Detailed Description

The EdgeStump either represents a list entry in the adjacency of a graph or an array field if edges are stored in an array.

### Remarks

The default EdgeStump in all graph types does not consider a cargo. However, ni default usage every graph does store an edge id. Edge ids are used to append additional properties to edges with the help of external property maps.

## Interface Functions Detail

### `void assignCargo(stump, cargo);`

Assigns a new cargo to the edge.

#### Parameters

`stump` | Pointer to the EdgeStump to set the cargo of.

#### Returns

`TCargo` | Reference to the cargo of the EdgeStump.

Calling assignCargo on EdgeStump objects without cargo does nothing.

#### Data Races

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

### `void assignNextS(es, es2);`

Assigns another EdgeStump to the next source pointer.

#### Parameters

`es` | Pointer to the EdgeStump.
`es2` | Pointer to the following EdgeStump.

Edge Stumps can be configured to have no source. In this case, there is no next source pointer.

#### Data Races

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

### `void assignNextT(es, es2);`

Assigns another EdgeStump to the next target pointer.

#### Parameters

`es` | Pointer to the EdgeStump.
`es2` | Pointer to the following EdgeStump.

#### Data Races

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

### `void assignSource(stump, t);`

Assigns a source vertex to an edge.

#### Parameters

`stump` | Pointer to the EdgeStump.
`t` | Vertex descriptor to assign as the source.

#### Remarks

A source vertex is not required in an edge stump. However, EdgeStump objects can be configured to contain a source vertex, as in undirected graphs.

#### Data Races

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

### `void assignTarget(stump, t);`

Assigns a target vertex to an edge.

#### Parameters

`stump` | Pointer to the EdgeStump.
`t` | Vertex descriptor to assign as the target.

#### Data Races

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

### `TCargo cargo(stump);`

Return cargo for an EdgeStump.

#### Parameters

`stump` | Pointer to the EdgeStump to query for its cargo.

#### Returns

`TCargo` | Reference to the cargo of the EdgeStump.

#### Data Races

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

### `TCargo getCargo(stump);`

Return cargo for an EdgeStump.

#### Parameters

`stump` | Pointer to the EdgeStump to query for its cargo.

#### Returns

`TCargo` | Reference to the cargo of the EdgeStump.

#### Data Races

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

### `TEdgeStump getNextS(es);`

Accesses the next source pointer.

#### Parameters

`es` | Pointer to the EdgeStump.

#### Returns

`Reference` | to the next source pointer.

Edge Stumps can be configured to have no source. In this case, there is no next source pointer.

#### Data Races

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

### `TEdgeStump getNextT(es);`

Get method for the next target pointer.

#### Parameters

`es` | Pointer to the EdgeStump.

#### Returns

`TEdgeStump` | Reference to the next target pointer.

#### Data Races

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

### `TVertexDescriptor getSource(stump);`

Get method for the source.

#### Parameters

`stump` | Pointer to the EdgeStump to get the source of.

#### Returns

`TVertexDescriptor` | The vetex descriptor stored in stump.

#### Remarks

A source vertex is not required in an edge stump. However, EdgeStump objects can be configured to contain a source vertex, as in undirected graphs.

#### Data Races

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

### `TVertexDescriptor getTarget(stump);`

Get method for the target.

#### Parameters

`stump` | Pointer to the EdgeStump to get the target of.

#### Returns

`TVertexDescriptor` | The vetex descriptor stored in stump.

#### Data Races

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

### `TEdgeStump nextS(es);`

Accesses the next source pointer.

#### Parameters

`es` | Pointer to the EdgeStump.

#### Returns

`Reference` | to the next source pointer.

Edge Stumps can be configured to have no source. In this case, there is no next source pointer.

#### Data Races

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

### `TEdgeStump nextT(es);`

Accesses the next target pointer.

#### Parameters

`es` | Pointer to the EdgeStump.

#### Returns

`TEdgeStump` | Reference to the next target pointer.

#### Data Races

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

### `TVertexDescriptor source(stump);`

Access to the source of an EdgeStump.

#### Parameters

`stump` | Pointer to the EdgeStump to access the source of.

#### Returns

`TVertexDescriptor` | Reference to the source vertex descriptor of stump.

#### Remarks

A source vertex is not required in an edge stump. However, EdgeStump objects can be configured to contain a source vertex, as in undirected graphs.

#### Data Races

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

### `TVertexDescriptor target(stump);`

Access to the target of an EdgeStump.

#### Parameters

`stump` | Pointer to the EdgeStump to access the target of.

#### Returns

`TVertexDescriptor` | Reference to the target vertex descriptor of stump.

#### Data Races

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

#### Dox Sources

    /*!
     * @class EdgeStump
     *
     * @headerfile <seqan/graph_types.h>
     *
     * @brief Encapsulate information for a single edge.
     *
     * @signature template <typename TCargo, bool IS_LIST, bool STORE_SOURCE, bool
     *            STORE_ID, typename TSpec> class EdgeStump;
     *
     * @tparam TCargo The cargo type of an edge. The cargo can be used to store
     *                arbitrary information with an edge or be <tt>void</tt>.
     *                Default: <tt>void</tt>.
     * @tparam IS_LIST A bool value that indicates whether it is a list or not.
     *                 Default: <tt>true</tt>.
     * @tparam STORE_SOURCE A bool value that indicates whether the source is stored
     *                      in the EdgeStump or not. Default: <tt>false</tt>.
     * @tparam STORE_ID A bool value that indictes whether the id is tored in the
     *                  EdgeStump or not. Note: Without edge ids, external property
     *                  maps do not work for edges! Default: <tt>true</tt>.
     * @tparam TSpec The specializing type. Default: <tt>Default</tt>.
     *
     * The EdgeStump either represents a list entry in the adjacency of a graph or
     * an array field if edges are stored in an array.
     *
     * @section Remarks
     *
     * The default EdgeStump in all graph types does not consider a cargo. However,
     * ni default usage every graph does store an edge id. Edge ids are used to
     * append additional properties to edges with the help of external property
     * maps.
     *
     * @fn EdgeStump#getCargo
     *
     * @brief Return cargo for an EdgeStump.
     *
     * @signature TCargo getCargo(stump);
     *
     * @param[in] stump Pointer to the EdgeStump to query for its cargo.
     *
     * @return TCargo Reference to the cargo of the EdgeStump.
     *
     * @fn EdgeStump#cargo
     *
     * @brief Return cargo for an EdgeStump.
     *
     * @signature TCargo cargo(stump);
     *
     * @param[in] stump Pointer to the EdgeStump to query for its cargo.
     *
     * @return TCargo Reference to the cargo of the EdgeStump.
     *
     * @fn EdgeStump#assignCargo
     *
     * @brief Assigns a new cargo to the edge.
     *
     * @signature void assignCargo(stump, cargo);
     *
     * @param[in] stump Pointer to the EdgeStump to set the cargo of.
     *
     * @return TCargo Reference to the cargo of the EdgeStump.
     *
     * Calling assignCargo on EdgeStump objects without cargo does nothing.
     *
     * @fn EdgeStump#assignTarget
     *
     * @brief Assigns a target vertex to an edge.
     *
     * @signature void assignTarget(stump, t);
     *
     * @param[in,out] stump Pointer to the EdgeStump.
     * @param[in] t Vertex descriptor to assign as the target.
     *
     * @fn EdgeStump#target
     *
     * @brief Access to the target of an EdgeStump.
     *
     * @signature TVertexDescriptor target(stump);
     *
     * @param[in] stump Pointer to the EdgeStump to access the target of.
     *
     * @return TVertexDescriptor Reference to the target vertex descriptor of stump.
     *
     * @fn EdgeStump#getTarget
     *
     * @brief Get method for the target.
     *
     * @signature TVertexDescriptor getTarget(stump);
     *
     * @param[in] stump Pointer to the EdgeStump to get the target of.
     *
     * @return TVertexDescriptor The vetex descriptor stored in stump.
     *
     * @fn EdgeStump#assignSource
     *
     * @brief Assigns a source vertex to an edge.
     *
     * @signature void assignSource(stump, t);
     *
     * @param[in,out] stump Pointer to the EdgeStump.
     * @param[in] t Vertex descriptor to assign as the source.
     *
     * @section Remarks
     *
     * A source vertex is not required in an edge stump. However, EdgeStump objects
     * can be configured to contain a source vertex, as in undirected graphs.
     *
     * @fn EdgeStump#source
     *
     * @brief Access to the source of an EdgeStump.
     *
     * @signature TVertexDescriptor source(stump);
     *
     * @param[in] stump Pointer to the EdgeStump to access the source of.
     *
     * @return TVertexDescriptor Reference to the source vertex descriptor of stump.
     *
     * @section Remarks
     *
     * A source vertex is not required in an edge stump. However, EdgeStump objects
     * can be configured to contain a source vertex, as in undirected graphs.
     *
     * @fn EdgeStump#getSource
     *
     * @brief Get method for the source.
     *
     * @signature TVertexDescriptor getSource(stump);
     *
     * @param[in] stump Pointer to the EdgeStump to get the source of.
     *
     * @return TVertexDescriptor The vetex descriptor stored in stump.
     *
     * @section Remarks
     *
     * A source vertex is not required in an edge stump. However, EdgeStump objects
     * can be configured to contain a source vertex, as in undirected graphs.
     *
     * @fn EdgeStump#assignNextT
     *
     * @brief Assigns another EdgeStump to the next target pointer.
     *
     * @signature void assignNextT(es, es2);
     *
     * @param[in,out] es Pointer to the EdgeStump.
     * @param[in] es2 Pointer to the following EdgeStump.
     *
     * @fn EdgeStump#nextT
     *
     * @brief Accesses the next target pointer.
     *
     * @signature TEdgeStump nextT(es);
     *
     * @param[in] es Pointer to the EdgeStump.
     *
     * @return TEdgeStump Reference to the next target pointer.
     *
     * @fn EdgeStump#getNextT
     *
     * @brief Get method for the next target pointer.
     *
     * @signature TEdgeStump getNextT(es);
     *
     * @param[in] es Pointer to the EdgeStump.
     *
     * @return TEdgeStump Reference to the next target pointer.
     *
     * @fn EdgeStump#assignNextS
     *
     * @brief Assigns another EdgeStump to the next source pointer.
     *
     * @signature void assignNextS(es, es2);
     *
     * @param[in,out] es Pointer to the EdgeStump.
     * @param[in] es2 Pointer to the following EdgeStump.
     *
     * Edge Stumps can be configured to have no source. In this case, there is no
     * next source pointer.
     *
     * @fn EdgeStump#nextS
     *
     * @brief Accesses the next source pointer.
     *
     * @signature TEdgeStump nextS(es);
     *
     * @param[in,out] es Pointer to the EdgeStump.
     *
     * @return Reference to the next source pointer.
     *
     * Edge Stumps can be configured to have no source. In this case, there is no
     * next source pointer.
     *
     * @fn EdgeStump#getNextS
     *
     * @brief Accesses the next source pointer.
     *
     * @signature TEdgeStump getNextS(es);
     *
     * @param[in,out] es Pointer to the EdgeStump.
     *
     * @return Reference to the next source pointer.
     *
     * Edge Stumps can be configured to have no source. In this case, there is no
     * next source pointer.
     */