|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Factory for constructing concrete copulas from a type tag and configuration. More...
#include <CopulaFactory.h>
Static Public Member Functions | |
| static std::unique_ptr< ICopula > | create (CopulaType name, CopulaConfig config, unsigned int seed=std::random_device{}()) |
| Creates a concrete copula instance. | |
Factory for constructing concrete copulas from a type tag and configuration.
CopulaFactory creates heap-allocated concrete implementations of ICopula and returns them through std::unique_ptr<ICopula>.
Supported constructions currently include:
Typical usage:
name argument is only used to select a switch branch, but does not itself enforce consistency with the variant content. For example, passing CopulaType::GAUSSIAN together with a StudentTCopulaConfig still constructs a Student-t copula.If stricter behavior is desired, the implementation should check that name matches the active type of config and throw otherwise.
Definition at line 88 of file CopulaFactory.h.
|
static |
Creates a concrete copula instance.
This method builds a concrete ICopula implementation using:
name),config),seed).Supported pairs are:
| name | Requested copula family. |
| config | Configuration object stored in a CopulaConfig variant. |
| seed | Optional random seed used to initialize the underlying RNG. |
| std::invalid_argument | If the copula type is unknown. |
name and the active alternative stored in config. The variant content effectively determines the class that is instantiated. Definition at line 23 of file CopulaFactory.cpp.