Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
JointDistribution.h
Go to the documentation of this file.
1#ifndef JOINTDISTRIBUTION_H
2#define JOINTDISTRIBUTION_H
3
4#include <cmath>
5#include <cstddef>
6#include <iomanip>
7#include <iostream>
8#include <limits>
9#include <memory>
10#include <random>
11#include <stdexcept>
12#include <string>
13#include <vector>
14#include <algorithm>
15#include <gsl/gsl_matrix.h>
16#include <gsl/gsl_linalg.h>
17
18#include "Include.h"
20#include "ICopula.h"
21#include "Math.h"
22
46public:
56 JointDistribution(std::vector<std::unique_ptr<IMarginalDistribution>> marginals,
57 std::unique_ptr<ICopula> copula);
58
65 std::vector<std::vector<double>> sample(std::size_t n) const;
66
72 std::vector<double> sample() const;
73
88 double logpdf(std::vector<double> x) const;
89
103 RealMatrix curvature(std::vector<double> x) const;
104
110 std::size_t dim();
111
117 std::vector<double> get_stds();
118
119private:
120 std::vector<std::unique_ptr<IMarginalDistribution>> marginals_;
121 std::unique_ptr<ICopula> copula_;
122};
123
124
125
126#endif
Abstract interface for multivariate copulas.
Interface for one-dimensional marginal probability distributions.
std::vector< double > get_stds()
Returns the standard deviations of all marginals.
RealMatrix curvature(std::vector< double > x) const
Computes the negative Hessian of the joint log-density.
std::size_t dim()
Returns the dimension of the random vector.
double logpdf(std::vector< double > x) const
Evaluates the joint log-density at a given point.
std::vector< std::vector< double > > sample(std::size_t n) const
Draws multiple samples from the joint distribution.