Bifrost: UnitigColors::UnitigColors_const_iterator Class Reference

Bifrost

Public Member Functions
UnitigColors::UnitigColors_const_iterator Class Reference

See UnitigColors::const_iterator. More...

Inherits iterator< std::forward_iterator_tag, pair< size_t, size_t > >.

## Public Member Functions
| UnitigColors_const_iterator ()
| Constructor of an empty iterator. More...
| UnitigColors_const_iterator (const UnitigColors_const_iterator &o)
| Copy constructor. More...
| ~UnitigColors_const_iterator ()
| Destructor.
UnitigColors_const_iterator & | operator= (const UnitigColors_const_iterator &o)
| Copy assignment operator. More...
pair< size_t, size_t > | operator* () const
| Indirection operator. More...
size_t | getKmerPosition () const
| Get the k-mer position of the k-mer visited by the iterator. More...
size_t | getColorID () const
| Get the color of the k-mer visited by the iterator. More...
UnitigColors_const_iterator | operator++ (int)
| Postfix increment operator: it iterates over the next k-mer of the unitig having the current color or the first k-mer having the next color (if all k-mers having the current color have already been visited by this iterator). More...
UnitigColors_const_iterator & | operator++ ()
| Prefix increment operator: it iterates over the next k-mer of the unitig having the current color or the first k-mer having the next color (if all k-mers having the current color have already been visited by this iterator). More...
UnitigColors_const_iterator & | nextColor ()
| Color increment operator: it iterates over the first k-mer position of the next color. More...
bool | operator== (const UnitigColors_const_iterator &o) const
| Equality operator. More...
bool | operator!= (const UnitigColors_const_iterator &o) const
| Inequality operator. More...

## Detailed Description

See UnitigColors::const_iterator.

## Constructor & Destructor Documentation

## ◆ UnitigColors_const_iterator() [1/2]

UnitigColors::UnitigColors_const_iterator::UnitigColors_const_iterator | ( |  | ) |

Constructor of an empty iterator.

The resulting iterator cannott be used as it is because it is not associated with any UnitigColors.

## ◆ UnitigColors_const_iterator() [2/2]

UnitigColors::UnitigColors_const_iterator::UnitigColors_const_iterator | ( | const UnitigColors_const_iterator & | o | ) |

Copy constructor.

After the call to this function, the same iterator exists twice in memory.

Parameters

  o | is a constant reference to the const_iterator to copy.

Returns
  a reference to the const_iterator copy.

## Member Function Documentation

## ◆ getColorID()

size_t UnitigColors::UnitigColors_const_iterator::getColorID | ( |  | ) | const
| inline

Get the color of the k-mer visited by the iterator.

It is equal to (*it).second.

Returns
  the color of the k-mer visited by the iterator. It is equal to (*it).second.

## ◆ getKmerPosition()

size_t UnitigColors::UnitigColors_const_iterator::getKmerPosition | ( |  | ) | const
| inline

Get the k-mer position of the k-mer visited by the iterator.

It is equal to (*it).first.

Returns
  the k-mer position of the k-mer visited by the iterator. It is equal to (*it).first.

## ◆ nextColor()

UnitigColors_const_iterator& UnitigColors::UnitigColors_const_iterator::nextColor | ( |  | ) |

Color increment operator: it iterates over the first k-mer position of the next color.

Returns
  a reference to the current iterator.

## ◆ operator!=()

bool UnitigColors::UnitigColors_const_iterator::operator!= | ( | const UnitigColors_const_iterator & | o | ) | const

Inequality operator.

Returns
  a boolean indicating if two iterators are different (true) or not (false).

## ◆ operator*()

pair<size_t, size_t> UnitigColors::UnitigColors_const_iterator::operator* | ( |  | ) | const
| inline

Indirection operator.

Returns
  a pair p of integers representing the position of a k-mer in the unitig (p.first) and the ID of the color associated with the k-mer at the given position (p.second).

## ◆ operator++() [1/2]

UnitigColors_const_iterator UnitigColors::UnitigColors_const_iterator::operator++ | ( | int |  | ) |

Postfix increment operator: it iterates over the next k-mer of the unitig having the current color or the first k-mer having the next color (if all k-mers having the current color have already been visited by this iterator).

Returns
  a copy of the iterator before the call to this operator.

## ◆ operator++() [2/2]

UnitigColors_const_iterator& UnitigColors::UnitigColors_const_iterator::operator++ | ( |  | ) |

Prefix increment operator: it iterates over the next k-mer of the unitig having the current color or the first k-mer having the next color (if all k-mers having the current color have already been visited by this iterator).

Returns
  a reference to the current iterator.

## ◆ operator=()

UnitigColors_const_iterator& UnitigColors::UnitigColors_const_iterator::operator= | ( | const UnitigColors_const_iterator & | o | ) |

Copy assignment operator.

After the call to this function, the same iterator exists twice in memory.

Parameters

  o | is a constant reference to the const_iterator to copy.

Returns
  a reference to the const_iterator copy.

## ◆ operator==()

bool UnitigColors::UnitigColors_const_iterator::operator== | ( | const UnitigColors_const_iterator & | o | ) | const

Equality operator.

Returns
  a boolean indicating if two iterators are the same (true) or not (false).

The documentation for this class was generated from the following file:

- src/ColorSet.hpp