#include <genesis/sequence/sequence_set.hpp>
Store a set of Sequences.
A SequenceSet is a simple container that allows to add(), remove() and iterate over Sequences. Sequences are kept in the order in which they were added and can be accessed via an index, see at().
Definition at line 53 of file sequence_set.hpp.
Public Member Functions | |
SequenceSet ()=default | |
SequenceSet (SequenceSet &&)=default | |
SequenceSet (SequenceSet const &)=default | |
~SequenceSet ()=default | |
reference | add (Sequence &&s) |
Add a Sequence to the SequenceSet by moving it, and return a reference to it. More... | |
reference | add (Sequence const &s) |
Add a Sequence to the SequenceSet by copying it, and return a reference to it. More... | |
reference | at (size_t index) |
const_reference | at (size_t index) const |
iterator | begin () |
const_iterator | begin () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
void | clear () |
Remove all Sequences from the SequenceSet, leaving it with a size() of 0. More... | |
bool | empty () const |
iterator | end () |
const_iterator | end () const |
SequenceSet & | operator= (SequenceSet &&)=default |
SequenceSet & | operator= (SequenceSet const &)=default |
reference | operator[] (size_t index) |
const_reference | operator[] (size_t index) const |
void | remove (iterator first, iterator last) |
Remove the Sequences between the first (inclusive) and the last (exclusive) iterator position from the SequenceSet. More... | |
void | remove (iterator position) |
Remove the Sequence at a given iterator position from the SequenceSet. More... | |
void | remove (size_t first_index, size_t last_index) |
Remove the Sequences between the first_index (inclusive) and the last_index (exclusive) from the SequenceSet. More... | |
void | remove (size_t index) |
Remove the Sequence at a given index from the SequenceSet. More... | |
size_t | size () const |
Public Types | |
using | const_iterator = std::vector< Sequence >::const_iterator |
using | const_reference = Sequence const & |
using | iterator = std::vector< Sequence >::iterator |
using | reference = Sequence & |
Friends | |
void | swap (SequenceSet &lhs, SequenceSet &rhs) |
|
default |
|
default |
|
default |
|
default |
Add a Sequence to the SequenceSet by moving it, and return a reference to it.
Definition at line 142 of file sequence_set.hpp.
Add a Sequence to the SequenceSet by copying it, and return a reference to it.
Definition at line 133 of file sequence_set.hpp.
|
inline |
Definition at line 106 of file sequence_set.hpp.
|
inline |
Definition at line 111 of file sequence_set.hpp.
|
inline |
Definition at line 205 of file sequence_set.hpp.
|
inline |
Definition at line 215 of file sequence_set.hpp.
|
inline |
Definition at line 225 of file sequence_set.hpp.
|
inline |
Definition at line 230 of file sequence_set.hpp.
|
inline |
Remove all Sequences from the SequenceSet, leaving it with a size() of 0.
Definition at line 196 of file sequence_set.hpp.
|
inline |
Return whether the SequenceSet is empty, i.e. whether its size() is 0.
Definition at line 101 of file sequence_set.hpp.
|
inline |
Definition at line 210 of file sequence_set.hpp.
|
inline |
Definition at line 220 of file sequence_set.hpp.
|
default |
|
default |
|
inline |
Definition at line 116 of file sequence_set.hpp.
|
inline |
Definition at line 121 of file sequence_set.hpp.
Remove the Sequences between the first
(inclusive) and the last
(exclusive) iterator position from the SequenceSet.
Definition at line 188 of file sequence_set.hpp.
|
inline |
Remove the Sequence at a given iterator position
from the SequenceSet.
Definition at line 179 of file sequence_set.hpp.
|
inline |
Remove the Sequences between the first_index
(inclusive) and the last_index
(exclusive) from the SequenceSet.
Definition at line 164 of file sequence_set.hpp.
|
inline |
Remove the Sequence at a given index
from the SequenceSet.
Definition at line 151 of file sequence_set.hpp.
|
inline |
Return the number of Sequences in the SequenceSet.
Definition at line 93 of file sequence_set.hpp.
|
friend |
Definition at line 80 of file sequence_set.hpp.
using const_iterator = std::vector<Sequence>::const_iterator |
Definition at line 62 of file sequence_set.hpp.
using const_reference = Sequence const& |
Definition at line 65 of file sequence_set.hpp.
Definition at line 61 of file sequence_set.hpp.
Definition at line 64 of file sequence_set.hpp.