OmniSciDB
a5dc49c757
|
#include <quantile.h>
Public Member Functions | |
Centroids ()=default | |
DEVICE | Centroids (RealType *sums, IndexType *counts, IndexType const size) |
DEVICE | Centroids (VectorView< RealType > sums, VectorView< IndexType > counts) |
DEVICE void | appendAndSortCurrent (Centroids &buff) |
DEVICE IndexType | capacity () const |
DEVICE void | clear () |
DEVICE IndexType | currCount () const |
DEVICE RealType | currMean () const |
DEVICE bool | hasCurr () const |
DEVICE bool | hasNext () const |
DEVICE RealType | mean (IndexType const i) const |
DEVICE bool | mergeIfFits (Centroids ¢roid, IndexType const max_count) |
DEVICE void | moveNextToCurrent () |
DEVICE IndexType | nextCount () const |
DEVICE RealType | nextSum () const |
DEVICE bool | operator< (Centroids const &b) const |
DEVICE void | push_back (RealType const value, RealType const count) |
DEVICE void | resetIndices (bool const forward) |
DEVICE size_t | size () const |
DEVICE IndexType | totalWeight () const |
Public Attributes | |
IndexType | curr_idx_ |
IndexType | next_idx_ |
int | inc_ |
VectorView< RealType > | sums_ |
VectorView< IndexType > | counts_ |
RealType | max_ {-infinity} |
RealType | min_ {infinity} |
Static Public Attributes | |
static constexpr RealType | infinity = std::numeric_limits<RealType>::infinity() |
static constexpr RealType | nan = std::numeric_limits<RealType>::quiet_NaN() |
Friends | |
template<typename RealType2 , typename IndexType2 > | |
std::ostream & | operator<< (std::ostream &, Centroids< RealType2, IndexType2 > const &) |
Definition at line 56 of file quantile.h.
|
default |
|
inline |
Definition at line 69 of file quantile.h.
|
inline |
Definition at line 72 of file quantile.h.
DEVICE void quantile::detail::Centroids< RealType, IndexType >::appendAndSortCurrent | ( | Centroids< RealType, IndexType > & | buff | ) |
Definition at line 351 of file quantile.h.
References VectorView< T >::begin(), gpu_enabled::copy(), quantile::detail::Centroids< RealType, IndexType >::counts_, quantile::detail::Centroids< RealType, IndexType >::curr_idx_, gpu_enabled::reverse(), VectorView< T >::size(), quantile::detail::Centroids< RealType, IndexType >::size(), gpu_enabled::sort(), and quantile::detail::Centroids< RealType, IndexType >::sums_.
|
inline |
Definition at line 77 of file quantile.h.
References VectorView< T >::capacity(), and quantile::detail::Centroids< RealType, IndexType >::sums_.
|
inline |
Definition at line 79 of file quantile.h.
References VectorView< T >::clear(), quantile::detail::Centroids< RealType, IndexType >::counts_, quantile::detail::Centroids< RealType, IndexType >::infinity, quantile::detail::Centroids< RealType, IndexType >::max_, quantile::detail::Centroids< RealType, IndexType >::min_, and quantile::detail::Centroids< RealType, IndexType >::sums_.
Referenced by quantile::detail::TDigest< RealType, IndexType >::mergeCentroids().
|
inline |
Definition at line 86 of file quantile.h.
References quantile::detail::Centroids< RealType, IndexType >::counts_, and quantile::detail::Centroids< RealType, IndexType >::curr_idx_.
|
inline |
Definition at line 88 of file quantile.h.
References quantile::detail::Centroids< RealType, IndexType >::curr_idx_, and quantile::detail::Centroids< RealType, IndexType >::mean().
|
inline |
Definition at line 90 of file quantile.h.
References quantile::detail::Centroids< RealType, IndexType >::curr_idx_, and quantile::detail::Centroids< RealType, IndexType >::size().
|
inline |
Definition at line 92 of file quantile.h.
References quantile::detail::Centroids< RealType, IndexType >::next_idx_, and quantile::detail::Centroids< RealType, IndexType >::size().
|
inline |
Definition at line 94 of file quantile.h.
References quantile::detail::Centroids< RealType, IndexType >::counts_, and quantile::detail::Centroids< RealType, IndexType >::sums_.
Referenced by quantile::detail::Centroids< RealType, IndexType >::currMean().
DEVICE bool quantile::detail::Centroids< RealType, IndexType >::mergeIfFits | ( | Centroids< RealType, IndexType > & | centroid, |
IndexType const | max_count | ||
) |
Definition at line 385 of file quantile.h.
References quantile::detail::Centroids< RealType, IndexType >::inc_, quantile::detail::Centroids< RealType, IndexType >::next_idx_, quantile::detail::Centroids< RealType, IndexType >::nextCount(), and quantile::detail::Centroids< RealType, IndexType >::nextSum().
DEVICE void quantile::detail::Centroids< RealType, IndexType >::moveNextToCurrent | ( | ) |
Definition at line 397 of file quantile.h.
|
inline |
Definition at line 101 of file quantile.h.
References quantile::detail::Centroids< RealType, IndexType >::counts_, and quantile::detail::Centroids< RealType, IndexType >::next_idx_.
Referenced by quantile::detail::anonymous_namespace{quantile.h}::Skipped< RealType, IndexType >::isDifferentMean(), quantile::detail::Centroids< RealType, IndexType >::mergeIfFits(), quantile::detail::Centroids< RealType, IndexType >::operator<(), and quantile::detail::anonymous_namespace{quantile.h}::Skipped< RealType, IndexType >::skipFirst().
|
inline |
Definition at line 103 of file quantile.h.
References quantile::detail::Centroids< RealType, IndexType >::next_idx_, and quantile::detail::Centroids< RealType, IndexType >::sums_.
Referenced by quantile::detail::anonymous_namespace{quantile.h}::Skipped< RealType, IndexType >::isDifferentMean(), quantile::detail::Centroids< RealType, IndexType >::mergeIfFits(), quantile::detail::Centroids< RealType, IndexType >::operator<(), and quantile::detail::anonymous_namespace{quantile.h}::Skipped< RealType, IndexType >::skipFirst().
|
inline |
Definition at line 107 of file quantile.h.
References quantile::detail::Centroids< RealType, IndexType >::nextCount(), and quantile::detail::Centroids< RealType, IndexType >::nextSum().
|
inline |
Definition at line 114 of file quantile.h.
References quantile::detail::Centroids< RealType, IndexType >::counts_, VectorView< T >::push_back(), and quantile::detail::Centroids< RealType, IndexType >::sums_.
DEVICE void quantile::detail::Centroids< RealType, IndexType >::resetIndices | ( | bool const | forward | ) |
Definition at line 407 of file quantile.h.
|
inline |
Definition at line 121 of file quantile.h.
References VectorView< T >::size(), and quantile::detail::Centroids< RealType, IndexType >::sums_.
Referenced by quantile::detail::Centroids< RealType, IndexType >::appendAndSortCurrent(), quantile::detail::Centroids< RealType, IndexType >::hasCurr(), quantile::detail::Centroids< RealType, IndexType >::hasNext(), and quantile::detail::operator<<().
|
inline |
Definition at line 123 of file quantile.h.
References gpu_enabled::accumulate(), VectorView< T >::begin(), quantile::detail::Centroids< RealType, IndexType >::counts_, and VectorView< T >::end().
|
friend |
VectorView<IndexType> quantile::detail::Centroids< RealType, IndexType >::counts_ |
Definition at line 61 of file quantile.h.
Referenced by quantile::detail::Centroids< RealType, IndexType >::appendAndSortCurrent(), quantile::detail::Centroids< RealType, IndexType >::clear(), quantile::detail::Centroids< RealType, IndexType >::currCount(), quantile::detail::Centroids< RealType, IndexType >::mean(), quantile::detail::Centroids< RealType, IndexType >::nextCount(), quantile::detail::operator<<(), quantile::detail::Centroids< RealType, IndexType >::push_back(), and quantile::detail::Centroids< RealType, IndexType >::totalWeight().
IndexType quantile::detail::Centroids< RealType, IndexType >::curr_idx_ |
Definition at line 57 of file quantile.h.
Referenced by quantile::detail::Centroids< RealType, IndexType >::appendAndSortCurrent(), quantile::detail::Centroids< RealType, IndexType >::currCount(), quantile::detail::Centroids< RealType, IndexType >::currMean(), quantile::detail::Centroids< RealType, IndexType >::hasCurr(), and quantile::detail::operator<<().
int quantile::detail::Centroids< RealType, IndexType >::inc_ |
Definition at line 59 of file quantile.h.
Referenced by quantile::detail::Centroids< RealType, IndexType >::mergeIfFits(), quantile::detail::anonymous_namespace{quantile.h}::Skipped< RealType, IndexType >::skipFirst(), and quantile::detail::anonymous_namespace{quantile.h}::Skipped< RealType, IndexType >::skipSubsequent().
|
static |
Definition at line 62 of file quantile.h.
Referenced by quantile::detail::Centroids< RealType, IndexType >::clear().
RealType quantile::detail::Centroids< RealType, IndexType >::max_ {-infinity} |
Definition at line 64 of file quantile.h.
Referenced by quantile::detail::Centroids< RealType, IndexType >::clear().
RealType quantile::detail::Centroids< RealType, IndexType >::min_ {infinity} |
Definition at line 65 of file quantile.h.
Referenced by quantile::detail::Centroids< RealType, IndexType >::clear().
|
static |
Definition at line 63 of file quantile.h.
IndexType quantile::detail::Centroids< RealType, IndexType >::next_idx_ |
Definition at line 58 of file quantile.h.
Referenced by quantile::detail::Centroids< RealType, IndexType >::hasNext(), quantile::detail::Centroids< RealType, IndexType >::mergeIfFits(), quantile::detail::Centroids< RealType, IndexType >::nextCount(), quantile::detail::Centroids< RealType, IndexType >::nextSum(), quantile::detail::operator<<(), quantile::detail::anonymous_namespace{quantile.h}::Skipped< RealType, IndexType >::skipFirst(), and quantile::detail::anonymous_namespace{quantile.h}::Skipped< RealType, IndexType >::skipSubsequent().
VectorView<RealType> quantile::detail::Centroids< RealType, IndexType >::sums_ |
Definition at line 60 of file quantile.h.
Referenced by quantile::detail::Centroids< RealType, IndexType >::appendAndSortCurrent(), quantile::detail::Centroids< RealType, IndexType >::capacity(), quantile::detail::Centroids< RealType, IndexType >::clear(), quantile::detail::Centroids< RealType, IndexType >::mean(), quantile::detail::TDigest< RealType, IndexType >::mergeSorted(), quantile::detail::Centroids< RealType, IndexType >::nextSum(), quantile::detail::operator<<(), quantile::detail::Centroids< RealType, IndexType >::push_back(), and quantile::detail::Centroids< RealType, IndexType >::size().