xgboost

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer Struct Reference

same as summary, but use STL to backup the space More...

`#include <quantile.h>`

Inheritance diagram for xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer:
Collaboration diagram for xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer:

## Public Member Functions
| SummaryContainer (const SummaryContainer &src)
| SummaryContainer ()
void | Reserve (size_t size)
| reserve space for summary More...
void | Reduce (const Summary &src, size_t max_nbyte)
| do elementwise combination of summary array this[i] = combine(this[i], src[i]) for each i More...
template<typename TStream >
void | Save (TStream &fo) const
| save the data structure into stream More...
template<typename TStream >
void | Load (TStream &fi)
| load data structure from input stream More...

## Static Public Member Functions
static size_t | CalcMemCost (size_t nentry)
| return the number of bytes this data structure cost in serialization More...

## Public Attributes
std::vector< Entry > | space

## Detailed Description

### template<typename DType, typename RType, class TSummary>
struct xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer

same as summary, but use STL to backup the space

## Constructor & Destructor Documentation

## ◆ SummaryContainer() [1/2]

template<typename DType , typename RType , class TSummary >

xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer::SummaryContainer | ( | const SummaryContainer & | src | ) |
| inline

## ◆ SummaryContainer() [2/2]

template<typename DType , typename RType , class TSummary >

xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer::SummaryContainer | ( |  | ) |
| inline

## Member Function Documentation

## ◆ CalcMemCost()

template<typename DType , typename RType , class TSummary >

static size_t xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer::CalcMemCost | ( | size_t | nentry | ) |
| inline static

return the number of bytes this data structure cost in serialization

## ◆ Load()

template<typename DType , typename RType , class TSummary >
template<typename TStream >

void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer::Load | ( | TStream & | fi | ) |
| inline

load data structure from input stream

## ◆ Reduce()

template<typename DType , typename RType , class TSummary >

void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer::Reduce | ( | const Summary & | src,
|  | size_t | max_nbyte
| ) |  |
| inline

do elementwise combination of summary array this[i] = combine(this[i], src[i]) for each i

Parameters

  src | the source summary
  max_nbyte | maximum number of byte allowed in here

## ◆ Reserve()

template<typename DType , typename RType , class TSummary >

void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer::Reserve | ( | size_t | size | ) |
| inline

reserve space for summary

## ◆ Save()

template<typename DType , typename RType , class TSummary >
template<typename TStream >

void xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer::Save | ( | TStream & | fo | ) | const
| inline

save the data structure into stream

## Member Data Documentation

## ◆ space

template<typename DType , typename RType , class TSummary >

std::vector<Entry> xgboost::common::QuantileSketchTemplate< DType, RType, TSummary >::SummaryContainer::space

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

- /home/runner/work/xgboost/xgboost/src/common/quantile.h