Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
IDependency.h
Go to the documentation of this file.
1#ifndef IDEPENDECY_H
2#define IDEPENDECY_H
3
4#include "Include.h"
5#include "Block.h"
6#include "Parameter.h"
8
44public:
46 virtual ~IDependency() = default;
47
58 virtual void add_block_dependency(const BlockName& name,
59 const std::unordered_map<ParameterType, std::vector<std::string>>& source_names,
60 ParameterType dest,
61 DepUpdateFunc recalculateFunc)
62 = 0;
63
74 virtual void add_param_dependency(const ParamId& pid,
75 const std::unordered_set<ParamId>& source_pids,
76 DepParamUpdateFunc recalculateFunc)
77 = 0;
78
88 virtual void remove_dependency(const BlockName& name, ParameterType src) = 0;
89
98 virtual void update_dependency(const BlockName& name, ParameterType src) = 0;
99};
100
101#endif // IDEPENDECY_H
Defines classes used to store parameters and to build derived/dependent parameter blocks.
std::function< void(const BlockSrc &, std::shared_ptr< DependentBlock >)> DepUpdateFunc
Function type used to recompute a DependentBlock from its sources.
Definition Block.h:56
Defines parameters whose values are lazily computed from other parameters.
std::function< void(const ParamSrc &, std::shared_ptr< DependentParameter >)> DepParamUpdateFunc
Function signature used to recompute a DependentParameter.
ParameterType
Defines the Parameter class used to store individual physical/model parameters.
Block identifier with alias support.
Definition BlockName.h:59
Interface for managing dependencies between parameter blocks or parameters.
Definition IDependency.h:43
virtual ~IDependency()=default
Virtual destructor for proper polymorphic cleanup.
virtual void add_block_dependency(const BlockName &name, const std::unordered_map< ParameterType, std::vector< std::string > > &source_names, ParameterType dest, DepUpdateFunc recalculateFunc)=0
Adds a dependent block.
virtual void remove_dependency(const BlockName &name, ParameterType src)=0
Removes a dependency by name and parameter type.
virtual void add_param_dependency(const ParamId &pid, const std::unordered_set< ParamId > &source_pids, DepParamUpdateFunc recalculateFunc)=0
Adds a dependent parameter.
virtual void update_dependency(const BlockName &name, ParameterType src)=0
Updates a dependency by name and parameter type.
Composite identifier for a single parameter.
Definition ParamID.h:57