autoppl  v0.8
A C++ template library for probabilistic programming
ppl Namespace Reference

Namespaces

 details
 
 expr
 
 math
 
 mcmc
 
 util
 

Classes

struct  ConfigBase
 
struct  Data
 
struct  Data< ValueType, ppl::mat >
 
struct  Data< ValueType, ppl::scl >
 
struct  Data< ValueType, ppl::vec >
 
struct  DataView
 
struct  DataView< ValueType, ppl::mat >
 
struct  DataView< ValueType, ppl::scl >
 
struct  DataView< ValueType, ppl::vec >
 
struct  dense_var
 
struct  diag_var
 
struct  MCMCResult
 
struct  MHConfig
 
struct  nuts_config_traits
 
struct  NUTSConfig
 
struct  Param
 
struct  Param< ValueType, ppl::mat, ConstraintType >
 
struct  Param< ValueType, ppl::scl, ConstraintType >
 
struct  Param< ValueType, ppl::vec, ConstraintType >
 
struct  ParamView
 
struct  StepConfig
 
struct  TParam
 
struct  TParam< ValueType, ppl::mat >
 
struct  TParam< ValueType, ppl::scl >
 
struct  TParam< ValueType, ppl::vec >
 
struct  TParamView
 
struct  TParamView< ValueType, scl >
 
struct  TParamView< ValueType, vec >
 
struct  TParamViewBase
 
struct  TParamViewBase< TParamView< ValueType, ShapeType > >
 
struct  unit_var
 
struct  VarConfig
 

Typedefs

using scl = ad::scl
 
using vec = ad::vec
 
using mat = ad::mat
 

Functions

template<class LowerType , class UpperType >
constexpr auto bounded (const LowerType &lower, const UpperType &upper)
 
template<class LowerType >
constexpr auto lower (const LowerType &expr)
 
constexpr auto pos_def ()
 
template<class ProbType , class = std::enable_if_t< util::is_valid_dist_param_v<ProbType> >>
constexpr auto bernoulli (const ProbType &p_expr)
 
template<class LocType , class ScaleType , class = std::enable_if_t< util::is_valid_dist_param_v<LocType> && util::is_valid_dist_param_v<ScaleType> >>
constexpr auto cauchy (const LocType &loc_expr, const ScaleType &scale_expr)
 
template<class MeanType , class SDType , class = std::enable_if_t< util::is_valid_dist_param_v<MeanType> && util::is_valid_dist_param_v<SDType> >>
constexpr auto normal (const MeanType &mean_expr, const SDType &sd_expr)
 
template<class MinType , class MaxType , class = std::enable_if_t< util::is_valid_dist_param_v<MinType> && util::is_valid_dist_param_v<MaxType> >>
constexpr auto uniform (const MinType &min_expr, const MaxType &max_expr)
 
template<class VType , class NType , class = std::enable_if_t< util::is_valid_dist_param_v<VType> && util::is_valid_dist_param_v<NType> >>
constexpr auto wishart (const VType &v_expr, const NType &n_expr)
 
template<class LHSType , class RHSType , class = std::enable_if_t< util::is_not_both_arithmetic_v<LHSType, RHSType> && util::is_valid_op_param_v<LHSType> && util::is_valid_op_param_v<RHSType> >>
constexpr auto operator+ (const LHSType &lhs, const RHSType &rhs)
 
template<class LHSType , class RHSType , class = std::enable_if_t< util::is_not_both_arithmetic_v<LHSType, RHSType> && util::is_valid_op_param_v<LHSType> && util::is_valid_op_param_v<RHSType> >>
constexpr auto operator- (const LHSType &lhs, const RHSType &rhs)
 
template<class LHSType , class RHSType , class = std::enable_if_t< util::is_not_both_arithmetic_v<LHSType, RHSType> && util::is_valid_op_param_v<LHSType> && util::is_valid_op_param_v<RHSType> >>
constexpr auto operator* (const LHSType &lhs, const RHSType &rhs)
 
template<class LHSType , class RHSType , class = std::enable_if_t< util::is_not_both_arithmetic_v<LHSType, RHSType> && util::is_valid_op_param_v<LHSType> && util::is_valid_op_param_v<RHSType> >>
constexpr auto operator/ (const LHSType &lhs, const RHSType &rhs)
 
template<class TParamViewType , class VarExprType , class = std::enable_if_t< util::is_tparam_v<TParamViewType> && util::is_valid_op_param_v<VarExprType> >>
constexpr auto operator+= (const TParamViewType &tp_view, const VarExprType &expr)
 
template<class TParamViewType , class VarExprType , class = std::enable_if_t< util::is_tparam_v<TParamViewType> && util::is_valid_op_param_v<VarExprType> >>
constexpr auto operator-= (const TParamViewType &tp_view, const VarExprType &expr)
 
template<class TParamViewType , class VarExprType , class = std::enable_if_t< util::is_tparam_v<TParamViewType> && util::is_valid_op_param_v<VarExprType> >>
constexpr auto operator*= (const TParamViewType &tp_view, const VarExprType &expr)
 
template<class TParamViewType , class VarExprType , class = std::enable_if_t< util::is_tparam_v<TParamViewType> && util::is_valid_op_param_v<VarExprType> >>
constexpr auto operator/= (const TParamViewType &tp_view, const VarExprType &expr)
 
template<class LHSExprType , class RHSExprType , class = std::enable_if_t< (util::is_var_expr_v<LHSExprType> || util::is_model_expr_v<LHSExprType>) && (util::is_var_expr_v<RHSExprType> || util::is_model_expr_v<RHSExprType>) >>
constexpr auto operator, (const LHSExprType &lhs, const RHSExprType &rhs)
 
template<class VarType , class DistType , class = std::enable_if_t< util::is_var_v<VarType> && util::is_dist_assignable_v<VarType> && util::is_dist_expr_v<DistType> >>
constexpr auto operator|= (const VarType &var, const DistType &dist)
 
template<class TPExpr , class ModelExpr , class = std::enable_if_t< util::is_var_expr_v<TPExpr> && util::is_model_expr_v<ModelExpr> >>
constexpr auto operator| (const TPExpr &tp, const ModelExpr &model)
 
template<class LHSVarExprType , class RHSVarExprType , class = std::enable_if_t< (util::is_var_v<LHSVarExprType> || util::is_var_expr_v<LHSVarExprType>) && (util::is_var_v<RHSVarExprType> || util::is_var_expr_v<RHSVarExprType>) >>
constexpr auto dot (const LHSVarExprType &lhs, const RHSVarExprType &rhs)
 
template<class Iter , class F >
constexpr auto for_each (Iter begin, Iter end, F f)
 
template<class ValueType , class ShapeType = scl, class ConstraintType = expr::constraint::Unconstrained>
constexpr auto make_param (size_t rows, size_t cols, const ConstraintType &c=ConstraintType())
 
template<class ValueType , class ShapeType = scl, class ConstraintType = expr::constraint::Unconstrained>
constexpr auto make_param (size_t rows, const ConstraintType &c=ConstraintType())
 
template<class ValueType , class ShapeType = scl, class ConstraintType = expr::constraint::Unconstrained>
constexpr auto make_param (const ConstraintType &c=ConstraintType())
 
template<class ExprType , class NUTSConfigType = NUTSConfig<>>
auto nuts (const ExprType &expr, const NUTSConfigType &config=NUTSConfigType())
 
template<class ExprType >
auto mh (const ExprType &expr, const MHConfig &config=MHConfig())
 

Typedef Documentation

◆ mat

using ppl::mat = typedef ad::mat

◆ scl

using ppl::scl = typedef ad::scl

Class tags to determine which shape a Data or Param is expected to be.

◆ vec

using ppl::vec = typedef ad::vec

Function Documentation

◆ bernoulli()

template<class ProbType , class = std::enable_if_t< util::is_valid_dist_param_v<ProbType> >>
constexpr auto ppl::bernoulli ( const ProbType &  p_expr)
inlineconstexpr

Builds a Bernoulli expression only when the parameter is a valid discrete distribution parameter type. See var_expr.hpp for more information.

◆ bounded()

template<class LowerType , class UpperType >
constexpr auto ppl::bounded ( const LowerType &  lower,
const UpperType &  upper 
)
inlineconstexpr

◆ cauchy()

template<class LocType , class ScaleType , class = std::enable_if_t< util::is_valid_dist_param_v<LocType> && util::is_valid_dist_param_v<ScaleType> >>
constexpr auto ppl::cauchy ( const LocType &  loc_expr,
const ScaleType &  scale_expr 
)
inlineconstexpr

Builds a Cauchy expression only when the parameters are both valid continuous distribution parameter types. See var_expr.hpp for more information.

◆ dot()

template<class LHSVarExprType , class RHSVarExprType , class = std::enable_if_t< (util::is_var_v<LHSVarExprType> || util::is_var_expr_v<LHSVarExprType>) && (util::is_var_v<RHSVarExprType> || util::is_var_expr_v<RHSVarExprType>) >>
constexpr auto ppl::dot ( const LHSVarExprType &  lhs,
const RHSVarExprType &  rhs 
)
inlineconstexpr

Builds a dot product expression for two expressions.

◆ for_each()

template<class Iter , class F >
constexpr auto ppl::for_each ( Iter  begin,
Iter  end,
f 
)
inlineconstexpr

◆ lower()

template<class LowerType >
constexpr auto ppl::lower ( const LowerType &  expr)
inlineconstexpr

◆ make_param() [1/3]

template<class ValueType , class ShapeType = scl, class ConstraintType = expr::constraint::Unconstrained>
constexpr auto ppl::make_param ( const ConstraintType &  c = ConstraintType())
inlineconstexpr

◆ make_param() [2/3]

template<class ValueType , class ShapeType = scl, class ConstraintType = expr::constraint::Unconstrained>
constexpr auto ppl::make_param ( size_t  rows,
const ConstraintType &  c = ConstraintType() 
)
inlineconstexpr

◆ make_param() [3/3]

template<class ValueType , class ShapeType = scl, class ConstraintType = expr::constraint::Unconstrained>
constexpr auto ppl::make_param ( size_t  rows,
size_t  cols,
const ConstraintType &  c = ConstraintType() 
)
inlineconstexpr

◆ mh()

template<class ExprType >
auto ppl::mh ( const ExprType &  expr,
const MHConfig config = MHConfig() 
)
inline

◆ normal()

template<class MeanType , class SDType , class = std::enable_if_t< util::is_valid_dist_param_v<MeanType> && util::is_valid_dist_param_v<SDType> >>
constexpr auto ppl::normal ( const MeanType &  mean_expr,
const SDType &  sd_expr 
)
inlineconstexpr

Builds a Normal expression only when the parameters are both valid continuous distribution parameter types. See var_expr.hpp for more information.

◆ nuts()

template<class ExprType , class NUTSConfigType = NUTSConfig<>>
auto ppl::nuts ( const ExprType &  expr,
const NUTSConfigType &  config = NUTSConfigType() 
)
inline

◆ operator*()

template<class LHSType , class RHSType , class = std::enable_if_t< util::is_not_both_arithmetic_v<LHSType, RHSType> && util::is_valid_op_param_v<LHSType> && util::is_valid_op_param_v<RHSType> >>
constexpr auto ppl::operator* ( const LHSType &  lhs,
const RHSType &  rhs 
)
inlineconstexpr

◆ operator*=()

template<class TParamViewType , class VarExprType , class = std::enable_if_t< util::is_tparam_v<TParamViewType> && util::is_valid_op_param_v<VarExprType> >>
constexpr auto ppl::operator*= ( const TParamViewType &  tp_view,
const VarExprType &  expr 
)
inlineconstexpr

◆ operator+()

template<class LHSType , class RHSType , class = std::enable_if_t< util::is_not_both_arithmetic_v<LHSType, RHSType> && util::is_valid_op_param_v<LHSType> && util::is_valid_op_param_v<RHSType> >>
constexpr auto ppl::operator+ ( const LHSType &  lhs,
const RHSType &  rhs 
)
inlineconstexpr

◆ operator+=()

template<class TParamViewType , class VarExprType , class = std::enable_if_t< util::is_tparam_v<TParamViewType> && util::is_valid_op_param_v<VarExprType> >>
constexpr auto ppl::operator+= ( const TParamViewType &  tp_view,
const VarExprType &  expr 
)
inlineconstexpr

◆ operator,()

template<class LHSExprType , class RHSExprType , class = std::enable_if_t< (util::is_var_expr_v<LHSExprType> || util::is_model_expr_v<LHSExprType>) && (util::is_var_expr_v<RHSExprType> || util::is_model_expr_v<RHSExprType>) >>
constexpr auto ppl::operator, ( const LHSExprType &  lhs,
const RHSExprType &  rhs 
)
inlineconstexpr

◆ operator-()

template<class LHSType , class RHSType , class = std::enable_if_t< util::is_not_both_arithmetic_v<LHSType, RHSType> && util::is_valid_op_param_v<LHSType> && util::is_valid_op_param_v<RHSType> >>
constexpr auto ppl::operator- ( const LHSType &  lhs,
const RHSType &  rhs 
)
inlineconstexpr

◆ operator-=()

template<class TParamViewType , class VarExprType , class = std::enable_if_t< util::is_tparam_v<TParamViewType> && util::is_valid_op_param_v<VarExprType> >>
constexpr auto ppl::operator-= ( const TParamViewType &  tp_view,
const VarExprType &  expr 
)
inlineconstexpr

◆ operator/()

template<class LHSType , class RHSType , class = std::enable_if_t< util::is_not_both_arithmetic_v<LHSType, RHSType> && util::is_valid_op_param_v<LHSType> && util::is_valid_op_param_v<RHSType> >>
constexpr auto ppl::operator/ ( const LHSType &  lhs,
const RHSType &  rhs 
)
inlineconstexpr

◆ operator/=()

template<class TParamViewType , class VarExprType , class = std::enable_if_t< util::is_tparam_v<TParamViewType> && util::is_valid_op_param_v<VarExprType> >>
constexpr auto ppl::operator/= ( const TParamViewType &  tp_view,
const VarExprType &  expr 
)
inlineconstexpr

◆ operator|()

template<class TPExpr , class ModelExpr , class = std::enable_if_t< util::is_var_expr_v<TPExpr> && util::is_model_expr_v<ModelExpr> >>
constexpr auto ppl::operator| ( const TPExpr &  tp,
const ModelExpr &  model 
)
inlineconstexpr

◆ operator|=()

template<class VarType , class DistType , class = std::enable_if_t< util::is_var_v<VarType> && util::is_dist_assignable_v<VarType> && util::is_dist_expr_v<DistType> >>
constexpr auto ppl::operator|= ( const VarType &  var,
const DistType &  dist 
)
inlineconstexpr

Builds an BarEqNode to associate var with dist only when var is a Variable and dist is a valid distribution expression. Ex. x |= uniform(0,1)

◆ pos_def()

constexpr auto ppl::pos_def ( )
inlineconstexpr

◆ uniform()

template<class MinType , class MaxType , class = std::enable_if_t< util::is_valid_dist_param_v<MinType> && util::is_valid_dist_param_v<MaxType> >>
constexpr auto ppl::uniform ( const MinType &  min_expr,
const MaxType &  max_expr 
)
inlineconstexpr

Builds a Uniform expression only when the parameters are both valid continuous distribution parameter types. See var_expr.hpp for more information.

◆ wishart()

template<class VType , class NType , class = std::enable_if_t< util::is_valid_dist_param_v<VType> && util::is_valid_dist_param_v<NType> >>
constexpr auto ppl::wishart ( const VType &  v_expr,
const NType &  n_expr 
)
inlineconstexpr

Builds a Wishart expression only when the parameters are both valid continuous distribution parameter types. See var_expr.hpp for more information.