mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
skewed_distribution< RealType > Struct Template Reference

A distribution of values in range [0; 1] that are skewed towards 0. More...

Collaboration diagram for skewed_distribution< RealType >:
[legend]

Public Types

using real_type = RealType
 

Public Member Functions

 skewed_distribution (real_type alpha)
 
real_type alpha () const
 
template<typename Generator >
real_type operator() (Generator &&g)
 

Private Attributes

real_type alpha_
 
std::uniform_real_distribution< real_typed_
 

Detailed Description

template<typename RealType>
struct skewed_distribution< RealType >

A distribution of values in range [0; 1] that are skewed towards 0.

The alpha parameter affects the factor of skewed-ness, with alpha = 1 causing a uniform distribution, alpha < 1 causing a skew towards 1, and alpha > 1 causing a skew towards 0.

Definition at line 31 of file cardinality_gen.cpp.

Member Typedef Documentation

◆ real_type

template<typename RealType >
using skewed_distribution< RealType >::real_type = RealType

Definition at line 33 of file cardinality_gen.cpp.

Constructor & Destructor Documentation

◆ skewed_distribution()

template<typename RealType >
skewed_distribution< RealType >::skewed_distribution ( real_type  alpha)
inline

Definition at line 41 of file cardinality_gen.cpp.

References skewed_distribution< RealType >::alpha_.

Member Function Documentation

◆ alpha()

template<typename RealType >
real_type skewed_distribution< RealType >::alpha ( ) const
inline

Definition at line 48 of file cardinality_gen.cpp.

References skewed_distribution< RealType >::alpha_.

◆ operator()()

template<typename RealType >
template<typename Generator >
real_type skewed_distribution< RealType >::operator() ( Generator &&  g)
inline

Field Documentation

◆ alpha_

template<typename RealType >
real_type skewed_distribution< RealType >::alpha_
private

◆ d_

template<typename RealType >
std::uniform_real_distribution<real_type> skewed_distribution< RealType >::d_
private

Definition at line 38 of file cardinality_gen.cpp.

Referenced by skewed_distribution< RealType >::operator()().


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