Turi Create  4.0
turi::ml_data_iterator Class Reference

#include <ml/ml_data/ml_data_iterator.hpp>

Public Member Functions

void reset ()
 Resets the iterator to the start of the sframes in ml_data.
 
bool done () const
 Returns true if the iteration is done, false otherwise.
 
size_t row_index () const
 
ml_data_row_reference operator* () const GL_HOT_INLINE_FLATTEN
 
ml_data_row_reference const * operator-> () const GL_HOT_INLINE_FLATTEN
 
const ml_data_iteratoroperator++ () GL_HOT_INLINE_FLATTEN
 Advance the iterator to the next observation.
 
const ml_dataml_data_source () const
 
ml_data_internal::entry_value _raw_row_entry (size_t raw_index) const GL_HOT_INLINE_FLATTEN
 
void seek (size_t row_index)
 

Detailed Description

Just a simple iterator on the ml_data class. It's just a convenience structure that keeps track of everything relevant for the toolkits.

Definition at line 37 of file ml_data_iterator.hpp.

Member Function Documentation

◆ _raw_row_entry()

ml_data_internal::entry_value turi::ml_data_iterator::_raw_row_entry ( size_t  raw_index) const
inline

Return the raw value of the internal row storage. Used by some of the internal ml_data processing routines.

Definition at line 102 of file ml_data_iterator.hpp.

◆ ml_data_source()

const ml_data& turi::ml_data_iterator::ml_data_source ( ) const
inline

Return the data this iterator is working with.

Definition at line 95 of file ml_data_iterator.hpp.

◆ operator*()

ml_data_row_reference turi::ml_data_iterator::operator* ( ) const
inline

Return a row reference. The row reference can be used to fill the observation vectors.

Definition at line 72 of file ml_data_iterator.hpp.

◆ operator->()

ml_data_row_reference const* turi::ml_data_iterator::operator-> ( ) const
inline

Dereference the iterator.

Definition at line 78 of file ml_data_iterator.hpp.

◆ row_index()

size_t turi::ml_data_iterator::row_index ( ) const
inline

Returns the current index of the sframe row, respecting all slicing operations on the original ml_data.

Definition at line 65 of file ml_data_iterator.hpp.

◆ seek()

void turi::ml_data_iterator::seek ( size_t  row_index)
inline

Seeks to the row given by row_index.

Definition at line 115 of file ml_data_iterator.hpp.


The documentation for this class was generated from the following file: