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

Abstract interface for composing dependent blocks and parameters. More...

#include <IBlockComposer.h>

Inheritance diagram for IBlockComposer:

Public Member Functions

virtual ~IBlockComposer ()=default
 
virtual void compose_block (const std::string &, const std::unordered_map< ParameterType, std::vector< std::string > > &, const DepUpdateFunc &)=0
 Compose (create/register) a dependent block.
 
virtual void compose_parameter (const ParamId &, const std::unordered_set< ParamId > &, const DepParamUpdateFunc &)=0
 Compose (create/register) a dependent parameter.
 
virtual void remove_block (const std::string &)=0
 Remove a previously composed dependent block.
 
virtual void update (const std::string &)=0
 Manually trigger an update for a previously composed block.
 
virtual void remove_all_composed_blocks ()=0
 Remove all blocks recorded as composed by this composer family.
 
bool has_composed_block (const std::string &block_name) const
 Returns whether a block has already been composed by this composer instance.
 

Protected Attributes

std::unordered_set< std::string > composed_blocks
 Registry of blocks composed through this composer instance.
 

Detailed Description

Abstract interface for composing dependent blocks and parameters.

A composer is responsible for:

  • creating dependent blocks given a name and sources,
  • creating dependent parameters given a ParamId and source ParamIds,
  • triggering updates,
  • removing composed entities,
  • optionally removing all composed entities at once.

The interface also provides a per-composer registry composed_blocks used by implementations to track which blocks were created during composition.

Definition at line 46 of file IBlockComposer.h.

Constructor & Destructor Documentation

◆ ~IBlockComposer()

virtual IBlockComposer::~IBlockComposer ( )
virtualdefault

Member Function Documentation

◆ compose_block()

virtual void IBlockComposer::compose_block ( const std::string &  ,
const std::unordered_map< ParameterType, std::vector< std::string > > &  ,
const DepUpdateFunc  
)
pure virtual

Compose (create/register) a dependent block.

Parameters
block_nameName of the dependent block to create.
source_namesMap associating each source ParameterType to a list of source block names.
update_funcFunction used to recalculate the dependent block.

Implemented in WilsonParamComposer.

◆ compose_parameter()

virtual void IBlockComposer::compose_parameter ( const ParamId ,
const std::unordered_set< ParamId > &  ,
const DepParamUpdateFunc  
)
pure virtual

Compose (create/register) a dependent parameter.

Parameters
pidTarget parameter identifier (block + code; type may be completed by implementation).
source_pidsSet of parameter identifiers this parameter depends on.
update_funcFunction used to recalculate the dependent parameter value.

Implemented in WilsonParamComposer.

◆ has_composed_block()

bool IBlockComposer::has_composed_block ( const std::string &  block_name) const
inline

Returns whether a block has already been composed by this composer instance.

This is intentionally lightweight and is used by setup hooks to stay idempotent when a group is built more than once, e.g. active group + SM intermediate group.

Definition at line 95 of file IBlockComposer.h.

◆ remove_all_composed_blocks()

virtual void IBlockComposer::remove_all_composed_blocks ( )
pure virtual

Remove all blocks recorded as composed by this composer family.

Implementations use composed_blocks to track created blocks.

Implemented in WilsonParamComposer.

◆ remove_block()

virtual void IBlockComposer::remove_block ( const std::string &  )
pure virtual

Remove a previously composed dependent block.

Parameters
block_nameName of the block to remove.

Implemented in WilsonParamComposer.

◆ update()

virtual void IBlockComposer::update ( const std::string &  )
pure virtual

Manually trigger an update for a previously composed block.

Parameters
block_nameName of the block to update.

Implemented in WilsonParamComposer.

Member Data Documentation

◆ composed_blocks

std::unordered_set<std::string> IBlockComposer::composed_blocks
protected

Registry of blocks composed through this composer instance.

This instance-local set allows manager-scoped cleanup operations (remove_all_composed_blocks) without leaking state across independent WilsonBuilder/CoefficientManager instances or tests.

Definition at line 107 of file IBlockComposer.h.


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