Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
CopulaFactory.h File Reference

Factory utilities for constructing copula objects from typed configurations. More...

#include <memory>
#include <random>
#include <algorithm>
#include <variant>
#include "CopulaType.h"
#include "ICopula.h"
#include "GaussianCopula.h"
#include "StudentTCopula.h"
Include dependency graph for CopulaFactory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CopulaFactory
 Factory for constructing concrete copulas from a type tag and configuration. More...
 

Typedefs

using CopulaConfig = std::variant< GaussianCopulaConfig, StudentTCopulaConfig >
 Variant type gathering all supported copula configuration objects.
 

Detailed Description

Factory utilities for constructing copula objects from typed configurations.

This header defines:

The goal is to decouple:

  • the user-facing choice of copula family,
  • the concrete implementation class,
  • and the configuration payload associated with that family.

Typical usage:

Vector u = cop->sample_u();
@ GAUSSIAN
Gaussian copula, defined by a correlation matrix.
static std::unique_ptr< ICopula > create(CopulaType name, CopulaConfig config, unsigned int seed=std::random_device{}())
Creates a concrete copula instance.
std::vector< double > Vector
Configuration object for a Gaussian copula.
Note
The configuration is stored in a std::variant, so only one supported configuration type can be provided at a time.
See also
ICopula
CopulaType
GaussianCopula
StudentTCopula

Definition in file CopulaFactory.h.

Typedef Documentation

◆ CopulaConfig

Variant type gathering all supported copula configuration objects.

A CopulaConfig currently holds one of:

This type is meant to be passed to CopulaFactory::create().

Definition at line 55 of file CopulaFactory.h.