# GroupPosition Calculation Position calculation functions.

## Grouped Function Overview

• `TPos posAdd(pos, delta);`
Returns a position where the local offset is increased by a value delta.
• `bool posAddAndCheck(pos, delta, text);`
Increases the local offset of a position by a value delta and check for overflow.
• `void posInc(pos);`
Increments the local offset of a position type.
• `TPos posNext(pos);`
Returns a position where the local offset is increased by one.
• `TPos posPrev(pos);`
Returns a position where the local offset is decreased by one.
• `TPos posSub(pos, delta);`
Returns a position where the local offset is decreased by a value delta.

## Grouped Functions Detail

### `TPos posAdd(pos, delta);`

Defined in
<seqan/sequence.h>
Returns a position where the local offset is increased by a value delta.

#### Parameters

 `pos` A position type, an integer with seqOfs or a pair (seqNo, seqOfs). Increase the local offset of pos by this value.

#### Returns

`TPos` Returns a value of the same type as pos where seqOfs is increased by delta.

### `bool posAddAndCheck(pos, delta, text);`

Defined in
<seqan/sequence.h>
Increases the local offset of a position by a value delta and check for overflow.

#### Parameters

 `pos` A position type, an integer with seqOfs or a pair (seqNo, seqOfs). Increase the local offset of pos by this value. The text to use for checking.

### `void posInc(pos);`

Defined in
<seqan/sequence.h>
Increments the local offset of a position type.

#### Parameters

 `pos` A position type, an integer with seqOfs or a pair (seqNo, seqOfs). In both cases, seqOfs will be incremented by one.

### `TPos posNext(pos);`

Defined in
<seqan/sequence.h>
Returns a position where the local offset is increased by one.

#### Parameters

 `pos` A position type, an integer with seqOfs or a pair (seqNo, seqOfs).

#### Returns

`TPos` Returns a value of the same type as pos where seqOfs is increased by one.

### `TPos posPrev(pos);`

Defined in
<seqan/sequence.h>
Returns a position where the local offset is decreased by one.

#### Parameters

 `pos` A position type, an integer with seqOfs or a pair (seqNo, seqOfs).

#### Returns

`TPos` The predecessor. TPos is the type of pos.

### `TPos posSub(pos, delta);`

Defined in
<seqan/sequence.h>
Returns a position where the local offset is decreased by a value delta.

#### Parameters

 `pos` A position type, an integer with seqOfs or a pair (seqNo, seqOfs). Decrease the local offset of pos by this value.

#### Returns

`TPos` Returns a value of the same type as pos where seqOfs is decreased by delta.