OmniSciDB  ba1bac9284
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
quantile::detail::CentroidsMemory< RealType, IndexType > Class Template Reference

#include <quantile.h>

Public Member Functions

 CentroidsMemory (size_t const size)
 
size_t nbytes () const
 
size_t size () const
 
VectorView< RealType > sums ()
 
VectorView< IndexType > counts ()
 

Private Attributes

std::vector< RealType > sums_
 
std::vector< IndexType > counts_
 

Detailed Description

template<typename RealType, typename IndexType>
class quantile::detail::CentroidsMemory< RealType, IndexType >

Definition at line 166 of file quantile.h.

Constructor & Destructor Documentation

template<typename RealType , typename IndexType >
quantile::detail::CentroidsMemory< RealType, IndexType >::CentroidsMemory ( size_t const  size)
inlineexplicit

Definition at line 172 of file quantile.h.

172 : sums_(size), counts_(size) {}
std::vector< RealType > sums_
Definition: quantile.h:168
std::vector< IndexType > counts_
Definition: quantile.h:169

Member Function Documentation

template<typename RealType , typename IndexType >
VectorView<IndexType> quantile::detail::CentroidsMemory< RealType, IndexType >::counts ( )
inline

Definition at line 176 of file quantile.h.

References quantile::detail::CentroidsMemory< RealType, IndexType >::counts_.

Referenced by quantile::detail::TDigest< RealType, IndexType >::setBuffer(), and quantile::detail::TDigest< RealType, IndexType >::setCentroids().

176  {
177  return {counts_.data(), counts_.size(), counts_.size()};
178  }
std::vector< IndexType > counts_
Definition: quantile.h:169

+ Here is the caller graph for this function:

template<typename RealType , typename IndexType >
size_t quantile::detail::CentroidsMemory< RealType, IndexType >::nbytes ( ) const
inline

Definition at line 173 of file quantile.h.

References quantile::detail::CentroidsMemory< RealType, IndexType >::sums_.

173 { return sums_.size() * (sizeof(RealType) + sizeof(IndexType)); }
std::vector< RealType > sums_
Definition: quantile.h:168
template<typename RealType , typename IndexType >
size_t quantile::detail::CentroidsMemory< RealType, IndexType >::size ( ) const
inline

Definition at line 174 of file quantile.h.

References quantile::detail::CentroidsMemory< RealType, IndexType >::sums_.

Referenced by quantile::detail::TDigest< RealType, IndexType >::setBuffer(), and quantile::detail::TDigest< RealType, IndexType >::setCentroids().

174 { return sums_.size(); }
std::vector< RealType > sums_
Definition: quantile.h:168

+ Here is the caller graph for this function:

template<typename RealType , typename IndexType >
VectorView<RealType> quantile::detail::CentroidsMemory< RealType, IndexType >::sums ( )
inline

Definition at line 175 of file quantile.h.

References quantile::detail::CentroidsMemory< RealType, IndexType >::sums_.

Referenced by quantile::detail::TDigest< RealType, IndexType >::setBuffer(), and quantile::detail::TDigest< RealType, IndexType >::setCentroids().

175 { return {sums_.data(), sums_.size(), sums_.size()}; }
std::vector< RealType > sums_
Definition: quantile.h:168

+ Here is the caller graph for this function:

Member Data Documentation

template<typename RealType , typename IndexType >
std::vector<IndexType> quantile::detail::CentroidsMemory< RealType, IndexType >::counts_
private
template<typename RealType , typename IndexType >
std::vector<RealType> quantile::detail::CentroidsMemory< RealType, IndexType >::sums_
private

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