Namespaces | Functions
math.h File Reference

additional math utils More...

#include <xgboost/base.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <utility>
#include <vector>
Include dependency graph for math.h:

Go to the source code of this file.


 namespace of xgboost


XGBOOST_DEVICE float xgboost::common::Sigmoid (float x)
 calculate the sigmoid of the input. More...
template<typename T , typename U >
constexpr XGBOOST_DEVICE bool xgboost::common::CloseTo (T a, U b)
 Equality test for both integer and floating point. More...
template<typename Iterator >
XGBOOST_DEVICE void xgboost::common::Softmax (Iterator start, Iterator end)
 Do inplace softmax transformaton on start to end. More...
template<typename Iterator >
XGBOOST_DEVICE Iterator xgboost::common::FindMaxIndex (Iterator begin, Iterator end)
 Find the maximum iterator within the iterators. More...
float xgboost::common::LogSum (float x, float y)
 perform numerically safe logsum More...
template<typename Iterator >
float xgboost::common::LogSum (Iterator begin, Iterator end)
 perform numerically safe logsum More...
template<typename T >
XGBOOST_DEVICE std::enable_if< std::numeric_limits< T >::is_integer, bool >::type xgboost::common::CheckNAN (T)
XGBOOST_DEVICE bool xgboost::common::CheckNAN (float x)
XGBOOST_DEVICE bool xgboost::common::CheckNAN (double x)
template<typename T >
XGBOOST_DEVICExgboost::common::LogGamma (T v)

Detailed Description

additional math utils

Copyright 2015 by Contributors

Tianqi Chen