autoppl  v0.8
A C++ template library for probabilistic programming
ppl::expr::dist::Uniform< MinType, MaxType > Struct Template Reference

#include <uniform.hpp>

Inheritance diagram for ppl::expr::dist::Uniform< MinType, MaxType >:
ppl::util::DistExprBase< Uniform< MinType, MaxType > > ppl::util::BaseCRTP< Uniform< MinType, MaxType > >

Public Types

using value_t = util::cont_param_t
 
using base_t = util::DistExprBase< Uniform< min_t, max_t > >
 
using dist_value_t = util::dist_value_t
 
- Public Types inherited from ppl::util::DistExprBase< Uniform< MinType, MaxType > >
using dist_value_t = util::dist_value_t
 

Public Member Functions

 Uniform (const min_t &min, const max_t &max)
 
template<class XType >
dist_value_t pdf (const XType &x)
 
template<class XType >
dist_value_t log_pdf (const XType &x)
 
template<class XType , class PtrPackType >
auto ad_log_pdf (const XType &x, const PtrPackType &pack) const
 
template<class PtrPackType >
void bind (const PtrPackType &pack)
 
void activate_refcnt () const
 
template<class XType , class GenType >
bool prune (XType &x, GenType &gen) const
 
- Public Member Functions inherited from ppl::util::BaseCRTP< Uniform< MinType, MaxType > >
Uniform< MinType, MaxType > & self ()
 
const Uniform< MinType, MaxType > & self () const
 

Detailed Description

template<class MinType, class MaxType>
struct ppl::expr::dist::Uniform< MinType, MaxType >

Uniform is a generic expression type for the uniform distribution.

If MinType or MaxType is a vector, then the variable assigned to this distribution must also be a vector.

Template Parameters
MinTypevariable expression for the min. Cannot be a matrix shape.
MaxTypevariable expression for the max. Cannot be a matrix shape.

Member Typedef Documentation

◆ base_t

template<class MinType , class MaxType >
using ppl::expr::dist::Uniform< MinType, MaxType >::base_t = util::DistExprBase<Uniform<min_t, max_t> >

◆ dist_value_t

template<class MinType , class MaxType >
using ppl::util::DistExprBase< T >::dist_value_t = util::dist_value_t

◆ value_t

template<class MinType , class MaxType >
using ppl::expr::dist::Uniform< MinType, MaxType >::value_t = util::cont_param_t

Constructor & Destructor Documentation

◆ Uniform()

template<class MinType , class MaxType >
ppl::expr::dist::Uniform< MinType, MaxType >::Uniform ( const min_t &  min,
const max_t &  max 
)
inline

Member Function Documentation

◆ activate_refcnt()

template<class MinType , class MaxType >
void ppl::expr::dist::Uniform< MinType, MaxType >::activate_refcnt ( ) const
inline

◆ ad_log_pdf()

template<class MinType , class MaxType >
template<class XType , class PtrPackType >
auto ppl::expr::dist::Uniform< MinType, MaxType >::ad_log_pdf ( const XType &  x,
const PtrPackType &  pack 
) const
inline

◆ bind()

template<class MinType , class MaxType >
template<class PtrPackType >
void ppl::expr::dist::Uniform< MinType, MaxType >::bind ( const PtrPackType &  pack)
inline

◆ log_pdf()

template<class MinType , class MaxType >
template<class XType >
dist_value_t ppl::expr::dist::Uniform< MinType, MaxType >::log_pdf ( const XType &  x)
inline

◆ pdf()

template<class MinType , class MaxType >
template<class XType >
dist_value_t ppl::expr::dist::Uniform< MinType, MaxType >::pdf ( const XType &  x)
inline

◆ prune()

template<class MinType , class MaxType >
template<class XType , class GenType >
bool ppl::expr::dist::Uniform< MinType, MaxType >::prune ( XType &  x,
GenType &  gen 
) const
inline

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