Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
Block.h File Reference

Defines classes used to store parameters and to build derived/dependent parameter blocks. More...

#include <array>
#include <functional>
#include "Include.h"
#include "Parameter.h"
#include "IStorage.h"
Include dependency graph for Block.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Block
 
class  DependentBlock
 Block whose content is derived from one or more source blocks. More...
 

Typedefs

typedef std::function< void(const BlockSrc &, std::shared_ptr< DependentBlock >)> DepUpdateFunc
 Function type used to recompute a DependentBlock from its sources.
 

Detailed Description

Defines classes used to store parameters and to build derived/dependent parameter blocks.

This file declares two main abstractions:

  • Block: a generic container of Parameter objects indexed by LhaID,
  • DependentBlock: a derived block whose content is recomputed from one or more source blocks.

These classes form one of the core layers of the dependency/update system:

  • a block stores parameters,
  • parameters may notify dependent parameters,
  • blocks may notify dependent blocks,
  • dependent blocks may lazily recompute their content from upstream blocks.

Main features provided here:

  • storage/retrieval of parameters,
  • optional block-wide scale,
  • observer registration between blocks,
  • block/parameter freeze-unfreeze semantics,
  • explicit dependency clearing and destruction,
  • lazy recomputation for dependent blocks.
See also
Parameter
DependentParameter
IStorage

Definition in file Block.h.

Typedef Documentation

◆ DepUpdateFunc

Function type used to recompute a DependentBlock from its sources.

The function receives:

  • a BlockSrc view exposing the source blocks and their values,
  • a shared pointer to the dependent block being recomputed.

The callback is expected to update the dependent block in place, typically through calls such as store_or_assign(...).

See also
BlockSrc
DependentBlock

Definition at line 56 of file Block.h.