ModErn Text Analysis
META Enumerates Textual Applications
|
Represents a tagged sequence of observations. More...
#include <sequence.h>
Public Types | |
using | iterator = std::vector< observation >::iterator |
the iterator class over the sequence | |
using | const_iterator = std::vector< observation >::const_iterator |
the const_iterator class over the sequence | |
using | size_type = std::vector< observation >::size_type |
the type containing the size for the sequence | |
Public Member Functions | |
void | add_observation (observation obs) |
Adds an observation to the end of the sequence. More... | |
void | add_symbol (symbol_t sym) |
Adds a symbol to the end of the sequence, untagged. More... | |
const observation & | operator[] (size_type idx) const |
Subscript operator. More... | |
observation & | operator[] (size_type idx) |
Subscript operator. More... | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
size_type | size () const |
Private Attributes | |
std::vector< observation > | observations_ |
the observations in the sequence | |
Represents a tagged sequence of observations.
void meta::sequence::sequence::add_observation | ( | observation | obs | ) |
Adds an observation to the end of the sequence.
obs | The observation to add |
void meta::sequence::sequence::add_symbol | ( | symbol_t | sym | ) |
Adds a symbol to the end of the sequence, untagged.
sym | The symbol for the untagged observation to add |
const observation & meta::sequence::sequence::operator[] | ( | size_type | idx | ) | const |
Subscript operator.
idx | The index to access |
observation & meta::sequence::sequence::operator[] | ( | size_type | idx | ) |
Subscript operator.
idx | The index to access |
auto meta::sequence::sequence::begin | ( | ) |
auto meta::sequence::sequence::end | ( | ) |
auto meta::sequence::sequence::begin | ( | ) | const |
auto meta::sequence::sequence::end | ( | ) | const |
auto meta::sequence::sequence::size | ( | ) | const |