Turi Create
4.0
|
#include <core/storage/sframe_data/sframe_reader_buffer.hpp>
Public Member Functions | |
sframe_reader_buffer (std::shared_ptr< typename sframe::reader_type > reader, size_t row_start, size_t row_end, size_t buffer_size=DEFAULT_SARRAY_READER_BUFFER_SIZE) | |
Construct from sframe reader with begin and end row. | |
const sframe_rows::row & | next () |
Return the next element in the reader. More... | |
const sframe_rows::row & | current () |
Returns the current element. | |
bool | has_next () |
Return true if the reader has more element. More... | |
sframe_rows & | get_buffer () |
Return the buffer. | |
size_t | size () |
Return the Number of elements between row_start and row_end. | |
void | clear () |
A buffered reader reading from a range of an sframe<T>.
Internally, the reader maintains a vector as buffer, and when reading reaches the end of the buffer, refill the buffer by reading from sframe.
Definition at line 45 of file sframe_reader_buffer.hpp.
|
inline |
Resets the buffer to the initial starting conditions. Reading from the buffer again will start from row_start.
Definition at line 152 of file sframe_reader_buffer.hpp.
|
inline |
Return true if the reader has more element.
Return true if the chunk has remaining element.
Definition at line 140 of file sframe_reader_buffer.hpp.
|
inline |
Return the next element in the reader.
Return the next element in the chunk.
Definition at line 124 of file sframe_reader_buffer.hpp.