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

Static class for handling dependent blocks and parameters across different Parameters instances. More...

#include <DependentBlockManager.h>

Static Public Member Functions

static void addDependentBlock (std::string name, std::unordered_map< ParameterType, std::vector< std::string > > source_names, ParameterType dest, DepUpdateFunc recalculateFunc)
 Adds a DependentBlock with multiple sources coming from various Parameters instances.
 
static void addDependentParameter (ParamId pid, std::unordered_set< ParamId > source_pids, DepParamUpdateFunc recalculateFunc)
 Adds a DependentParameter based on multiple source parameters.
 
static void removeDependentBlock (const std::string &name, ParameterType src)
 Removes a DependentBlock from a specified Parameters instance.
 
static void update (const std::string &name, ParameterType src)
 Manually triggers an update on a DependentBlock.
 

Detailed Description

Static class for handling dependent blocks and parameters across different Parameters instances.

DependentBlockManager manages the lifecycle of blocks or parameters that are computed from others and automatically updated when their sources change.

Definition at line 28 of file DependentBlockManager.h.

Member Function Documentation

◆ addDependentBlock()

void DependentBlockManager::addDependentBlock ( std::string  name,
std::unordered_map< ParameterType, std::vector< std::string > >  source_names,
ParameterType  dest,
DepUpdateFunc  recalculateFunc 
)
static

Adds a DependentBlock with multiple sources coming from various Parameters instances.

Creates a new DependentBlock based on the provided sources and registers it in the destination Parameters instance.

Parameters
nameName of the DependentBlock to create.
source_namesMap associating each source ParameterType to a list of block names.
destDestination ParameterType where the DependentBlock will be registered.
recalculateFuncLambda function used to recalculate the content of the DependentBlock.

Definition at line 4 of file DependentBlockManager.cpp.

◆ addDependentParameter()

void DependentBlockManager::addDependentParameter ( ParamId  pid,
std::unordered_set< ParamId source_pids,
DepParamUpdateFunc  recalculateFunc 
)
static

Adds a DependentParameter based on multiple source parameters.

Creates a DependentParameter whose value depends on other parameters, and stores it in the appropriate block.

Parameters
pidID of the DependentParameter to create.
source_pidsSet of IDs corresponding to the source parameters.
recalculateFuncLambda function used to recalculate the value of the DependentParameter.

Definition at line 46 of file DependentBlockManager.cpp.

◆ removeDependentBlock()

void DependentBlockManager::removeDependentBlock ( const std::string &  name,
ParameterType  src 
)
static

Removes a DependentBlock from a specified Parameters instance.

Parameters
nameName of the DependentBlock to remove.
srcThe ParameterType (model) where the block is registered.

Definition at line 102 of file DependentBlockManager.cpp.

◆ update()

void DependentBlockManager::update ( const std::string &  name,
ParameterType  src 
)
static

Manually triggers an update on a DependentBlock.

Parameters
nameName of the block to update.
srcThe ParameterType (model) where the block is located.

Definition at line 120 of file DependentBlockManager.cpp.


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