Medial Code Documentation
Loading...
Searching...
No Matches
Data Structures | Public Member Functions
xgboost::common::Index Class Reference

Optionally compressed gradient index. More...

#include <hist_util.h>

Data Structures

struct  CompressBin
 

Public Member Functions

template<typename T >
CompressBin< T > MakeCompressor () const
 
 Index (Index const &i)=delete
 
Indexoperator= (Index const &i)=delete
 
 Index (Index &&i)=delete
 
Indexoperator= (Index &&i)=default
 Move assignment for lazy initialization.
 
 Index (Span< std::uint8_t > data, BinTypeSize bin_size)
 Construct the index from data.
 
uint32_t operator[] (size_t i) const
 
BinTypeSize GetBinTypeSize () const
 
template<typename T >
T const * data () const
 
template<typename T >
T * data ()
 
std::uint32_t const * Offset () const
 
std::size_t OffsetSize () const
 
std::size_t Size () const
 
void SetBinOffset (std::vector< uint32_t > const &cut_ptrs)
 
auto begin () const
 
auto end () const
 
auto begin ()
 
auto end ()
 

Detailed Description

Optionally compressed gradient index.

The compression works only with dense data.

The main body of construction code is in gradient_index.cc, this struct is only a view class.

Constructor & Destructor Documentation

◆ Index()

xgboost::common::Index::Index ( Span< std::uint8_t >  data,
BinTypeSize  bin_size 
)
inline

Construct the index from data.

Parameters
dataStorage for compressed histogram bin.
bin_sizeNumber of bytes for each bin.

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