Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
GenericCopula Class Reference

Partial base implementation of a copula with RNG support. More...

#include <GenericCopula.h>

Inheritance diagram for GenericCopula:
Collaboration diagram for GenericCopula:

Public Member Functions

 GenericCopula (unsigned int seed=std::random_device{}())
 Constructs the copula base with a seeded random engine.
 
- Public Member Functions inherited from ICopula
virtual ~ICopula ()=default
 Virtual destructor.
 
virtual std::vector< std::vector< double > > sample_u (std::size_t n)=0
 Draws multiple samples from the copula.
 
virtual std::vector< double > sample_u ()=0
 Draws a single sample from the copula.
 
virtual double log_density (std::vector< double > u)=0
 Evaluates the log-density of the copula at a point in the unit cube.
 
virtual RealMatrix dlog_density (std::vector< double > u)=0
 Evaluates the gradient of the log-density of the copula at a point in the unit cube.
 
virtual RealMatrix ddlog_density (std::vector< double > u)=0
 Evaluates the hessian of the log-density of the copula at a point in the unit cube.
 
virtual LogDensityDiff log_c_dc_ddc (std::vector< double > u)=0
 Evaluates the value, gradient and hessian of the log-density of the copula at a point in the unit cube.
 

Protected Attributes

const gsl_rng_type * rng_tp {gsl_rng_mt19937}
 
gsl_rng_sptr eng_ {nullptr, &gsl_rng_free}
 GSL RNG type used by the copula.
 

Detailed Description

Partial base implementation of a copula with RNG support.

This class mainly exists to factorize:

  • GSL RNG type selection,
  • generator allocation and initialization.

Derived classes are responsible for:

  • specifying the dependence structure,
  • implementing sampling and log-density evaluation.

Definition at line 44 of file GenericCopula.h.

Constructor & Destructor Documentation

◆ GenericCopula()

GenericCopula::GenericCopula ( unsigned int  seed = std::random_device{}())
explicit

Constructs the copula base with a seeded random engine.

Parameters
seedSeed used to initialize the underlying GSL RNG.

Definition at line 3 of file GenericCopula.cpp.

Member Data Documentation

◆ eng_

gsl_rng_sptr GenericCopula::eng_ {nullptr, &gsl_rng_free}
protected

GSL RNG type used by the copula.

Definition at line 55 of file GenericCopula.h.

◆ rng_tp

const gsl_rng_type* GenericCopula::rng_tp {gsl_rng_mt19937}
protected

Definition at line 54 of file GenericCopula.h.


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