oss_src/sframe/sframe_reader.hpp
sframe_iterator(
      const std::vector<std::shared_ptr<sarray_reader<flexible_type> > > &data,
      size_t segmentid,
      bool is_begin_iterator) : _data(&data),
    _segmentid(segmentid) {

      // Create an SArray iterator for each column of the SFrame.
      cur_iter.resize(_data->size());
      cur_element.resize(_data->size());
      for(size_t i = 0; i < _data->size(); ++i) {
        if(is_begin_iterator) {
          cur_iter[i] = _data->at(i)->begin(segmentid);
        } else {
          cur_iter[i] = _data->at(i)->end(segmentid);
        }
      }

      // Variables that make equality easier to check
      segment_limit = _data->at(0)->segment_length(segmentid);

      if(is_begin_iterator) {
        cur_segment_pos = 0;
      } else {
        cur_segment_pos = segment_limit;
      }
    }
/**
   * Constructs an iterator from the underlying data structure of an SFrame
   *
   * \param data The "SFrame" to iterate over
   * \param segmentid The segment to read. Must be a valid segment.
   * \param 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
   */
Constructs an iterator from the underlying data structure of an SFrame
\param data The "SFrame" to iterate over
\param segmentid The segment to read. Must be a valid segment.
\param 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
Constructs an iterator from the underlying data structure of an SFrame \ param data The " SFrame " to iterate over \ param segmentid The segment to read . Must be a valid segment . \ param 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
sframe_iterator(
      const std::vector<std::shared_ptr<sarray_reader<flexible_type> > > &data,
      size_t segmentid,
      bool is_begin_iterator) : _data(&data),
    _segmentid(segmentid) {
      cur_iter.resize(_data->size());
      cur_element.resize(_data->size());
      for(size_t i = 0; i < _data->size(); ++i) {
        if(is_begin_iterator) {
          cur_iter[i] = _data->at(i)->begin(segmentid);
        } else {
          cur_iter[i] = _data->at(i)->end(segmentid);
        }
      }
      segment_limit = _data->at(0)->segment_length(segmentid);
      if(is_begin_iterator) {
        cur_segment_pos = 0;
      } else {
        cur_segment_pos = segment_limit;
      }
    }
sframe_iterator ( const std :: vector < std :: shared_ptr < sarray_reader < flexible_type > > > & data , size_t segmentid , bool is_begin_iterator ) : _data ( & data ) , _segmentid ( segmentid ) { cur_iter . resize ( _data -> size ( ) ) ; cur_element . resize ( _data -> size ( ) ) ; for ( size_t i = 0 ; i < _data -> size ( ) ; ++ i ) { if ( is_begin_iterator ) { cur_iter [ i ] = _data -> at ( i ) -> begin ( segmentid ) ; } else { cur_iter [ i ] = _data -> at ( i ) -> end ( segmentid ) ; } } segment_limit = _data -> at ( 0 ) -> segment_length ( segmentid ) ; if ( is_begin_iterator ) { cur_segment_pos = 0 ; } else { cur_segment_pos = segment_limit ; } }
Constructs an iterator from the underlying data structure of an SFrame
 \param data The "SFrame" to iterate over
 \param segmentid The segment to read.
Constructs an iterator from the underlying data structure of an SFrame \ param data The " SFrame " to iterate over \ param segmentid The segment to read .
// Create an SArray iterator for each column of the SFrame. // Variables that make equality easier to check