MUQ  0.4.3
muq::Modeling::PyDistribution Class Referenceabstract

#include <PyDistribution.h>

Inheritance diagram for muq::Modeling::PyDistribution:

Detailed Description

Definition at line 10 of file PyDistribution.h.

Public Member Functions

 PyDistribution (unsigned int varSizeIn, Eigen::VectorXi const &hyperSizesIn=Eigen::VectorXi())
 
- Public Member Functions inherited from muq::Modeling::Distribution
 Distribution (unsigned int varSizeIn, Eigen::VectorXi const &hyperSizesIn=Eigen::VectorXi())
 
virtual ~Distribution ()=default
 
virtual double LogDensity (ref_vector< Eigen::VectorXd > const &inputs)
 Evaluate the log-density. More...
 
virtual double LogDensity (std::vector< Eigen::VectorXd > const &inputs)
 
 VARIADIC_TO_REFVECTOR (LogDensity, Eigen::VectorXd, double)
 
virtual Eigen::VectorXd GradLogDensity (unsigned int wrt, std::vector< Eigen::VectorXd > const &inputs)
 
virtual Eigen::VectorXd GradLogDensity (unsigned int wrt, ref_vector< Eigen::VectorXd > const &inputs)
 
template<typename... Args>
Eigen::VectorXd GradLogDensity (unsigned int wrt, Args... args)
 
virtual Eigen::VectorXd ApplyLogDensityHessian (unsigned int const inWrt1, unsigned int const inWrt2, ref_vector< Eigen::VectorXd > const &input, Eigen::VectorXd const &vec)
 
virtual Eigen::VectorXd ApplyLogDensityHessian (unsigned int const inWrt1, unsigned int const inWrt2, std::vector< Eigen::VectorXd > const &input, Eigen::VectorXd const &vec)
 
Eigen::VectorXd Sample (ref_vector< Eigen::VectorXd > const &inputs)
 Sample the distribution. More...
 
Eigen::VectorXd Sample (std::vector< Eigen::VectorXd > const &inputs)
 
Eigen::VectorXd Sample ()
 Sample the distribution with no inputs. More...
 
 VARIADIC_TO_REFVECTOR (Sample, Eigen::VectorXd, Eigen::VectorXd)
 
std::shared_ptr< DensityAsDensity ()
 Returns a density built from this distribution. More...
 
std::shared_ptr< RandomVariableAsVariable ()
 Returns a random variable built from this distribution. More...
 

Static Public Member Functions

static std::vector< Eigen::VectorXd > ToStdVec (ref_vector< Eigen::VectorXd > const &input)
 
static ref_vector< Eigen::VectorXd > ToRefVec (std::vector< Eigen::VectorXd > const &input)
 

Additional Inherited Members

- Public Attributes inherited from muq::Modeling::Distribution
const unsigned int varSize
 
const Eigen::VectorXi hyperSizes
 

Constructor & Destructor Documentation

◆ PyDistribution()

PyDistribution::PyDistribution ( unsigned int  varSizeIn,
Eigen::VectorXi const &  hyperSizesIn = Eigen::VectorXi() 
)

Definition at line 5 of file PyDistribution.cpp.

Member Function Documentation

◆ LogDensityImpl() [1/2]

double PyDistribution::LogDensityImpl ( ref_vector< Eigen::VectorXd > const &  inputs)
overrideprotectedvirtual

Implement the log-density.

If known, the log-density should be implemented by a child. If it is not overridden then the default behavior is to return negative infinity (-1.0*std::numeric_limits<double>::infinity()).

Parameters
[in]inputsthe vector of inputs to the log-density
Returns
The log density

Reimplemented from muq::Modeling::Distribution.

Definition at line 11 of file PyDistribution.cpp.

References ToStdVec().

◆ LogDensityImpl() [2/2]

virtual double muq::Modeling::PyDistribution::LogDensityImpl ( std::vector< Eigen::VectorXd > const &  inputs)
protectedpure virtual

◆ SampleImpl() [1/2]

Eigen::VectorXd PyDistribution::SampleImpl ( ref_vector< Eigen::VectorXd > const &  inputs)
overrideprotectedvirtual

Sample the distribution.

Should be overwritten by a child. The default behavior is to return boost::none

Reimplemented from muq::Modeling::Distribution.

Definition at line 7 of file PyDistribution.cpp.

References SampleImpl(), and ToStdVec().

◆ SampleImpl() [2/2]

virtual Eigen::VectorXd muq::Modeling::PyDistribution::SampleImpl ( std::vector< Eigen::VectorXd > const &  inputs)
protectedpure virtual

Referenced by SampleImpl().

◆ ToRefVec()

ref_vector< Eigen::VectorXd > PyDistribution::ToRefVec ( std::vector< Eigen::VectorXd > const &  input)
static

Definition at line 15 of file PyDistribution.cpp.

◆ ToStdVec()

std::vector< Eigen::VectorXd > PyDistribution::ToStdVec ( ref_vector< Eigen::VectorXd > const &  input)
static

Definition at line 20 of file PyDistribution.cpp.

Referenced by LogDensityImpl(), and SampleImpl().


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