OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 168 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 174 of file quantile.h.

174 : sums_(size), counts_(size) {}
std::vector< RealType > sums_
Definition: quantile.h:170
std::vector< IndexType > counts_
Definition: quantile.h:171

Member Function Documentation

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

Definition at line 178 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().

178  {
179  return {counts_.data(), counts_.size(), counts_.size()};
180  }
std::vector< IndexType > counts_
Definition: quantile.h:171

+ 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 175 of file quantile.h.

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

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

Definition at line 176 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().

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

+ 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 177 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().

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

+ 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: