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

Public Member Functions

 __init__ (self, Optional[_CppDependantBlockInfoProvider] cpp_obj=None)
 
bool is_dependent_block (self, ParameterType parameter_type, str block_name)
 
List[str] get_source_blocks (self, ParameterType parameter_type, str block_name)
 
List[str] get_dependent_blocks (self, ParameterType parameter_type, str block_name)
 
List[str] get_all_source_blocks (self, ParameterType parameter_type, str block_name)
 
List[str] get_all_dependent_blocks (self, ParameterType parameter_type, str block_name)
 

Protected Attributes

 _cpp_obj
 

Detailed Description

Inspect block-level dependencies from Python.

Args:
    cpp_obj: Optional already-bound C++ provider. When omitted, a new C++
        ``DependantBlockInfoProvider`` is created.

Example:
    >>> provider = DependantBlockInfoProvider()
    >>> provider.is_dependent_block(ParameterType.SM, "EW")
    True
    >>> provider.get_source_blocks(ParameterType.SM, "EW")
    ['QCD', 'SMINPUTS']

Definition at line 19 of file DependantBlockInfoProvider.py.

Constructor & Destructor Documentation

◆ __init__()

pyhyperiso.core.Core.DependantBlockInfoProvider.DependantBlockInfoProvider.__init__ (   self,
Optional[_CppDependantBlockInfoProvider]   cpp_obj = None 
)
Create the Python wrapper around the C++ provider.

Definition at line 34 of file DependantBlockInfoProvider.py.

Member Function Documentation

◆ get_all_dependent_blocks()

List[str] pyhyperiso.core.Core.DependantBlockInfoProvider.DependantBlockInfoProvider.get_all_dependent_blocks (   self,
ParameterType  parameter_type,
str  block_name 
)
Return all transitive blocks depending on ``block_name``.

Args:
    parameter_type: Parameter namespace containing the block.
    block_name: Name or alias of the block to inspect.

Returns:
    list[str]: Sorted deduplicated dependent/downstream block names.

Definition at line 90 of file DependantBlockInfoProvider.py.

◆ get_all_source_blocks()

List[str] pyhyperiso.core.Core.DependantBlockInfoProvider.DependantBlockInfoProvider.get_all_source_blocks (   self,
ParameterType  parameter_type,
str  block_name 
)
Return all transitive upstream blocks used by ``block_name``.

Args:
    parameter_type: Parameter namespace containing the block.
    block_name: Name or alias of the block to inspect.

Returns:
    list[str]: Sorted deduplicated source block names.

Definition at line 78 of file DependantBlockInfoProvider.py.

◆ get_dependent_blocks()

List[str] pyhyperiso.core.Core.DependantBlockInfoProvider.DependantBlockInfoProvider.get_dependent_blocks (   self,
ParameterType  parameter_type,
str  block_name 
)
Return the direct blocks depending on ``block_name``.

This answers: "which blocks directly depend on this block?"

Args:
    parameter_type: Parameter namespace containing the block.
    block_name: Name or alias of the block to inspect.

Returns:
    list[str]: Sorted direct dependent/downstream block names.

Definition at line 64 of file DependantBlockInfoProvider.py.

◆ get_source_blocks()

List[str] pyhyperiso.core.Core.DependantBlockInfoProvider.DependantBlockInfoProvider.get_source_blocks (   self,
ParameterType  parameter_type,
str  block_name 
)
Return the direct upstream blocks used by ``block_name``.

This answers: "which blocks does this block depend on directly?"

Args:
    parameter_type: Parameter namespace containing the block.
    block_name: Name or alias of the block to inspect.

Returns:
    list[str]: Sorted direct source block names.

Definition at line 50 of file DependantBlockInfoProvider.py.

◆ is_dependent_block()

bool pyhyperiso.core.Core.DependantBlockInfoProvider.DependantBlockInfoProvider.is_dependent_block (   self,
ParameterType  parameter_type,
str  block_name 
)
Return whether ``block_name`` is a dependent block.

Args:
    parameter_type: Parameter namespace containing the block.
    block_name: Name or alias of the block to inspect.

Returns:
    bool: ``True`` when the underlying C++ block is a dependent block.

Definition at line 38 of file DependantBlockInfoProvider.py.

Member Data Documentation

◆ _cpp_obj

pyhyperiso.core.Core.DependantBlockInfoProvider.DependantBlockInfoProvider._cpp_obj
protected

Definition at line 36 of file DependantBlockInfoProvider.py.


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