Public Member Functions | List of all members
ana::StanFitSupport< VarClass > Class Template Referenceabstract

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-01/CAFAna/Core/IFitVar.h"

Inheritance diagram for ana::StanFitSupport< VarClass >:

Public Member Functions

virtual stan::math::var GetValue (const osc::IOscCalcAdjustableStan *osc) const =0
 
virtual void SetValue (osc::IOscCalcAdjustableStan *osc, stan::math::var val) const =0
 
virtual stan::math::var Prior (const stan::math::var &var, const osc::IOscCalcAdjustableStan *calc) const
 
virtual stan::math::var LogPrior (const stan::math::var &var, const osc::IOscCalcAdjustableStan *calc) const
 

Detailed Description

template<typename VarClass>
class ana::StanFitSupport< VarClass >

Mixin class to indicate that Stan support should be expected in a given FitVar. Inherit from this in addition to either IFitVar or IConstrainedFitVar. For more on this idiom consult, e.g., http://www.drdobbs.com/cpp/mixin-based-programming-in-c/184404445?pgno=1

Definition at line 78 of file IFitVar.h.

Member Function Documentation

template<typename VarClass>
virtual stan::math::var ana::StanFitSupport< VarClass >::GetValue ( const osc::IOscCalcAdjustableStan osc) const
pure virtual
template<typename VarClass>
virtual stan::math::var ana::StanFitSupport< VarClass >::LogPrior ( const stan::math::var var,
const osc::IOscCalcAdjustableStan calc 
) const
inlinevirtual

Log of the prior probability density. Default implementation just does log(Prior()), but this can be overridden if there optimizations that speed up the calculation.

Definition at line 102 of file IFitVar.h.

Referenced by ana::StanFitter::log_prob().

102 {return StanLog(Prior(var, calc));}
virtual stan::math::var Prior(const stan::math::var &var, const osc::IOscCalcAdjustableStan *calc) const
Definition: IFitVar.h:98
stan::math::var StanLog(const stan::math::var &x)
Definition: IFitVar.cxx:30
template<typename VarClass>
virtual stan::math::var ana::StanFitSupport< VarClass >::Prior ( const stan::math::var var,
const osc::IOscCalcAdjustableStan calc 
) const
inlinevirtual

The prior probability density distribution on this variable (which can depend on others if needed). If there are optimizations that can make log(Prior()) more expensive than a direct implementation, consider implementing LogPrior() directly instead.

Definition at line 98 of file IFitVar.h.

98 {return StanExp(LogPrior(var, calc));}
stan::math::var StanExp(const stan::math::var &x)
Definition: IFitVar.cxx:29
virtual stan::math::var LogPrior(const stan::math::var &var, const osc::IOscCalcAdjustableStan *calc) const
Definition: IFitVar.h:102
template<typename VarClass>
virtual void ana::StanFitSupport< VarClass >::SetValue ( osc::IOscCalcAdjustableStan osc,
stan::math::var  val 
) const
pure virtual

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