SG++-Doxygen-Documentation
sgpp::datadriven::DataSourceIterator Class Reference

Iterator object for walking convenient walking over the batches of a sgpp::datadriven::DataSource. More...

#include <DataSourceIterator.hpp>

Public Member Functions

 DataSourceIterator (DataSource &sampleProvider, size_t counter)
 Constructor. More...
 
bool operator!= (const DataSourceIterator &other) const
 Compares two sgpp::datadriven::DataSourceIterator objects for equality. More...
 
Datasetoperator* ()
 Dereferencing an iterator yields the object the iterator currently points to. More...
 
const DataSourceIteratoroperator++ ()
 Go to the next sgpp::datadriven::Dataset (if available). More...
 

Detailed Description

Iterator object for walking convenient walking over the batches of a sgpp::datadriven::DataSource.

Constructor & Destructor Documentation

◆ DataSourceIterator()

sgpp::datadriven::DataSourceIterator::DataSourceIterator ( DataSource sampleProvider,
size_t  counter 
)

Constructor.

Parameters
sampleProviderDataSource to iterate over
countercurrent iteration of the sgpp::datadriven::DataSource.

Member Function Documentation

◆ operator!=()

bool sgpp::datadriven::DataSourceIterator::operator!= ( const DataSourceIterator other) const

Compares two sgpp::datadriven::DataSourceIterator objects for equality.

Required for iteration.

Parameters
otherThe other iterator to compare this object to.
Returns
True if the iterators do not have an equal amount of iterations.

◆ operator*()

Dataset * sgpp::datadriven::DataSourceIterator::operator* ( )

Dereferencing an iterator yields the object the iterator currently points to.

Returns
: A Pointer to a new sgpp::datadriven::Dataset. It is generated by the sgpp::datadriven::DataSource which provides the data which might change its state. The sgpp::datadriven::Dataset is owned by the caller.

References sgpp::datadriven::DataSource::getNextSamples().

◆ operator++()

const DataSourceIterator & sgpp::datadriven::DataSourceIterator::operator++ ( )

Go to the next sgpp::datadriven::Dataset (if available).

Returns
const reference to this object with updated state.

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