Turi Create
4.0
|
#include <core/storage/sframe_data/sframe_reader.hpp>
Public Member Functions | |
sframe_iterator (const std::vector< std::shared_ptr< sarray_reader< flexible_type > > > &data, size_t segmentid, bool is_begin_iterator) | |
sframe_iterator & | operator++ () |
bool | operator== (const sframe_iterator &other) const |
bool | operator!= (const sframe_iterator &other) const |
const value_type & | operator* () const |
const value_type * | operator-> () const |
int | operator- (const sframe_iterator &other) const |
A input iterator over an SFrame.
The sframe_iterator provides a simple input iterator (like forward iterator, but one pass. i.e. increment of one, invalidates all other copies.) over a segment of an sframe. It essentially exposes a column of vectors, where each vector is a row in a table.
Since this class wraps several sarray_iterators, it inherits their guarantees, and is thus an input iterator.
Definition at line 43 of file sframe_reader.hpp.
|
inline |
Constructs an iterator from the underlying data structure of an SFrame
data | The "SFrame" to iterate over |
segmentid | The segment to read. Must be a valid segment. |
is_begin_iterator | If true, constructs an iterator pointing to the first row of the given segment If false, constructs an iterator pointing to one row past the end of the given segment |
Definition at line 64 of file sframe_reader.hpp.
|
inline |
Returns true if iterators are different (different SFrame, different segment, or different position)
Definition at line 140 of file sframe_reader.hpp.
|
inline |
Returns the current element. Value will be invalid if the iterator is past the end of the sarray (points to end)
Definition at line 150 of file sframe_reader.hpp.
|
inline |
Advances the iterator to the next row of the segment
Definition at line 94 of file sframe_reader.hpp.
|
inline |
Returns the distance between two iterators. Both iterators must be from the same segment of the same sframe, otherwise result is undefined.
Definition at line 170 of file sframe_reader.hpp.
|
inline |
Returns a pointer to the current element. Value will be invalid if iterator == end.
Definition at line 161 of file sframe_reader.hpp.
|
inline |
Returns true if iterators are identical (points to the same SFrame, in the same segment, at the same position)
Definition at line 130 of file sframe_reader.hpp.