Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
dmlc::DataIter< DType > Class Template Referenceabstract

data iterator interface this is not a C++ style iterator, but nice for data pulling:) This interface is used to pull in the data The system can do some useful tricks for you like pre-fetching from disk and pre-computation. More...

#include <data.h>

Inheritance diagram for dmlc::DataIter< DType >:
dmlc::Parser< IndexType, real_t > dmlc::Parser< uint32_t > dmlc::RowBlockIter< IndexType, real_t > xgboost.data::detail::SingleBatchDataIter< ArrayAdapterBatch > xgboost.data::detail::SingleBatchDataIter< CSCAdapterBatch > xgboost.data::detail::SingleBatchDataIter< CSCArrayAdapterBatch > xgboost.data::detail::SingleBatchDataIter< CSRAdapterBatch > xgboost.data::detail::SingleBatchDataIter< CSRArrayAdapterBatch > xgboost.data::detail::SingleBatchDataIter< DataTableAdapterBatch > xgboost.data::detail::SingleBatchDataIter< DenseAdapterBatch > dmlc::Parser< IndexType, DType > dmlc::RowBlockIter< IndexType, DType > xgboost.data::detail::SingleBatchDataIter< DType >

Public Member Functions

virtual ~DataIter (void) DMLC_THROW_EXCEPTION
 destructor
 
virtual void BeforeFirst (void)=0
 set before first of the item
 
virtual bool Next (void)=0
 move to next item
 
virtual const DType & Value (void) const =0
 get current data
 

Detailed Description

template<typename DType>
class dmlc::DataIter< DType >

data iterator interface this is not a C++ style iterator, but nice for data pulling:) This interface is used to pull in the data The system can do some useful tricks for you like pre-fetching from disk and pre-computation.

Usage example:

itr->BeforeFirst();
while (itr->Next()) {
const DType &batch = itr->Value();
// some computations
}
Template Parameters
DTypethe data type

Member Function Documentation

◆ BeforeFirst()

template<typename DType >
virtual void dmlc::DataIter< DType >::BeforeFirst ( void  )
pure virtual

◆ Next()

template<typename DType >
virtual bool dmlc::DataIter< DType >::Next ( void  )
pure virtual

◆ Value()

template<typename DType >
virtual const DType & dmlc::DataIter< DType >::Value ( void  ) const
pure virtual

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