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

Static factory creating scalar marginal-distribution objects. More...

#include <MarginalFactory.h>

Static Public Member Functions

static std::unique_ptr< IMarginalDistributioncreate (MarginalType name, MarginalConfig cfg, unsigned int seed=std::random_device{}())
 Creates a concrete marginal-distribution object.
 

Detailed Description

Static factory creating scalar marginal-distribution objects.

This factory converts:

Internally, construction is delegated through a std::visit over the config variant, so the actual type stored in MarginalConfig matters.

Note
The current implementation accepts the following effective mappings:
Warning
In the current implementation, the LIKELIHOOD branch throws before reaching the generic variant-based constructor, so it is effectively disabled through this API entry point.

Definition at line 65 of file MarginalFactory.h.

Member Function Documentation

◆ create()

std::unique_ptr< IMarginalDistribution > MarginalFactory::create ( MarginalType  name,
MarginalConfig  cfg,
unsigned int  seed = std::random_device{}() 
)
static

Creates a concrete marginal-distribution object.

The returned distribution is heap-allocated and owned through std::unique_ptr<IMarginalDistribution>.

Parameters
nameRequested marginal-distribution family.
cfgVariant containing the concrete configuration data.
seedSeed passed to the underlying distribution constructor.
Returns
Unique pointer to a newly created marginal distribution.
Exceptions
std::invalid_argumentif:
  • the marginal type is unknown,
  • the current implementation rejects the selected type (notably LIKELIHOOD through this entry point).

Definition at line 17 of file MarginalFactory.cpp.


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