This class extends AbstractReader_ to read dataset in plain text format. More...
#include <plain-text-reader.hpp>
Public Member Functions | |
| PlainTextReader (const std::string &filename, const PlainTextReaderColumns columns=PlainTextReaderColumns::TXYP, const std::string &separator=" ", const std::size_t buffer_size=0, const bool use_threading=false) | |
| std::size_t | count () override |
| Count the total number of events available. | |
Public Member Functions inherited from ev::AbstractReader_ | |
| AbstractReader_ (const std::size_t buffer_size, const bool use_threading) | |
| Constructor for AbstractReader_. | |
| bool | read (Event &e) |
| Read the next event. | |
| bool | read (Vector &vector, const int n) |
| Read next n events. | |
| bool | read (Queue &queue, const int n, const bool keep_size=false) |
| Read next n events. | |
| bool | read_t (Vector &vector, const double t) |
| Read the next events until the specified duration is reached. | |
| bool | read_t (Queue &queue, const double t, const bool keep_size=false) |
| Get the next events until the specified duration is reached and store them in a queue. | |
| bool | skip (int n) |
| Skip the next n events. | |
| bool | skip_t (const double t) |
| Skip events for the specified duration. | |
| void | reset () |
| Start reading from the first event. | |
Additional Inherited Members | |
Static Public Attributes inherited from ev::AbstractReader_ | |
| static constexpr std::size_t | NO_BUFFER = 0 |
| static constexpr std::size_t | INF_BUFFER = std::numeric_limits<std::size_t>::max() |
Protected Attributes inherited from ev::AbstractReader_ | |
| const std::size_t | bufferSize_ |
| std::thread | thread_ |
| Queue | buffer_ |
| std::mutex | bufferMutex_ |
| std::atomic< bool > | threadRunning_ {} |
This class extends AbstractReader_ to read dataset in plain text format.
|
nodiscardoverridevirtual |
Count the total number of events available.
Implements ev::AbstractReader_.