xgboost
Public Member Functions | List of all members
xgboost::RowSet Class Reference

A vector-like structure to represent set of rows. But saves the memory when all rows are in the set (common case in xgb) More...

#include <data.h>

Collaboration diagram for xgboost::RowSet:
Collaboration graph

Public Member Functions

bst_uint operator[] (size_t i) const
 
size_t Size () const
 
void PushBack (bst_uint i)
 push the index back to the set More...
 
void Clear ()
 clear the set More...
 
void Save (dmlc::Stream *fo) const
 save rowset to file. More...
 
bool Load (dmlc::Stream *fi)
 Load rowset from file. More...
 
 RowSet ()=default
 constructor More...
 

Detailed Description

A vector-like structure to represent set of rows. But saves the memory when all rows are in the set (common case in xgb)

Constructor & Destructor Documentation

◆ RowSet()

xgboost::RowSet::RowSet ( )
default

constructor

Member Function Documentation

◆ Clear()

void xgboost::RowSet::Clear ( )
inline

clear the set

◆ Load()

bool xgboost::RowSet::Load ( dmlc::Stream *  fi)
inline

Load rowset from file.

Parameters
fiThe file to be loaded.
Returns
if read is successful.

◆ operator[]()

bst_uint xgboost::RowSet::operator[] ( size_t  i) const
inline
Returns
i-th row index

◆ PushBack()

void xgboost::RowSet::PushBack ( bst_uint  i)
inline

push the index back to the set

◆ Save()

void xgboost::RowSet::Save ( dmlc::Stream *  fo) const
inline

save rowset to file.

Parameters
foThe file to be saved.

◆ Size()

size_t xgboost::RowSet::Size ( ) const
inline
Returns
the size of the set.

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