Medial Code Documentation
Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Data Fields
xgboost::common::WQSummary< DType, RType > Struct Template Reference

experimental wsummary More...

#include <quantile.h>

Inheritance diagram for xgboost::common::WQSummary< DType, RType >:
xgboost::common::WXQSummary< DType, RType >

Data Structures

struct  Entry
 an entry in the sketch summary More...
 
struct  Queue
 input data queue before entering the summary More...
 

Public Member Functions

 WQSummary (Entry *data, size_t size)
 
RType MaxError () const
 
Entry Query (DType qvalue, size_t &istart) const
 query qvalue, start from istart
 
RType MaxRank () const
 
void CopyFrom (const WQSummary &src)
 copy content from src
 
void MakeFromSorted (const Entry *entries, size_t n)
 
void CheckValid (RType eps) const
 debug function, validate whether the summary run consistency check to check if it is a valid summary
 
void SetPrune (const WQSummary &src, size_t maxsize)
 set current summary to be pruned summary of src assume data field is already allocated to be at least maxsize
 
void SetCombine (const WQSummary &sa, const WQSummary &sb)
 set current summary to be merged summary of sa and sb
 
void Print () const
 
void FixError (RType *err_mingap, RType *err_maxgap, RType *err_wgap) const
 

Data Fields

Entrydata
 data field
 
size_t size
 number of elements in the summary
 

Detailed Description

template<typename DType, typename RType>
struct xgboost::common::WQSummary< DType, RType >

experimental wsummary

Template Parameters
DTypetype of data content
RTypetype of rank

Member Function Documentation

◆ CheckValid()

template<typename DType , typename RType >
void xgboost::common::WQSummary< DType, RType >::CheckValid ( RType  eps) const
inline

debug function, validate whether the summary run consistency check to check if it is a valid summary

Parameters
epsthe tolerate error level, used when RType is floating point and some inconsistency could occur due to rounding error

◆ CopyFrom()

template<typename DType , typename RType >
void xgboost::common::WQSummary< DType, RType >::CopyFrom ( const WQSummary< DType, RType > &  src)
inline

copy content from src

Parameters
srcsource sketch

◆ MaxError()

template<typename DType , typename RType >
RType xgboost::common::WQSummary< DType, RType >::MaxError ( ) const
inline
Returns
the maximum error of the Summary

◆ MaxRank()

template<typename DType , typename RType >
RType xgboost::common::WQSummary< DType, RType >::MaxRank ( ) const
inline
Returns
maximum rank in the summary

◆ Query()

template<typename DType , typename RType >
Entry xgboost::common::WQSummary< DType, RType >::Query ( DType  qvalue,
size_t &  istart 
) const
inline

query qvalue, start from istart

Parameters
qvaluethe value we query for
istartstarting position

◆ SetCombine()

template<typename DType , typename RType >
void xgboost::common::WQSummary< DType, RType >::SetCombine ( const WQSummary< DType, RType > &  sa,
const WQSummary< DType, RType > &  sb 
)
inline

set current summary to be merged summary of sa and sb

Parameters
safirst input summary to be merged
sbsecond input summary to be merged

◆ SetPrune()

template<typename DType , typename RType >
void xgboost::common::WQSummary< DType, RType >::SetPrune ( const WQSummary< DType, RType > &  src,
size_t  maxsize 
)
inline

set current summary to be pruned summary of src assume data field is already allocated to be at least maxsize

Parameters
srcsource summary
maxsizesize we can afford in the pruned sketch

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