xgboost
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
xgboost::Entry Struct Reference

Element from a sparse vector. More...

#include <data.h>

Collaboration diagram for xgboost::Entry:
Collaboration graph

Public Member Functions

 Entry ()=default
 default constructor More...
 
XGBOOST_DEVICE Entry (bst_feature_t index, bst_float fvalue)
 constructor with index and value More...
 
bool operator== (const Entry &other) const
 

Static Public Member Functions

static bool CmpValue (const Entry &a, const Entry &b)
 reversely compare feature values More...
 
static bool CmpIndex (Entry const &a, Entry const &b)
 

Public Attributes

bst_feature_t index
 feature index More...
 
bst_float fvalue
 feature value More...
 

Detailed Description

Element from a sparse vector.

Constructor & Destructor Documentation

◆ Entry() [1/2]

xgboost::Entry::Entry ( )
default

default constructor

◆ Entry() [2/2]

XGBOOST_DEVICE xgboost::Entry::Entry ( bst_feature_t  index,
bst_float  fvalue 
)
inline

constructor with index and value

Parameters
indexThe feature or row index.
fvalueThe feature value.

Member Function Documentation

◆ CmpIndex()

static bool xgboost::Entry::CmpIndex ( Entry const &  a,
Entry const &  b 
)
inlinestatic

◆ CmpValue()

static bool xgboost::Entry::CmpValue ( const Entry a,
const Entry b 
)
inlinestatic

reversely compare feature values

◆ operator==()

bool xgboost::Entry::operator== ( const Entry other) const
inline

Member Data Documentation

◆ fvalue

bst_float xgboost::Entry::fvalue

feature value

◆ index

bst_feature_t xgboost::Entry::index

feature index


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