FunctionGenerator¶
- class madspace.FunctionGenerator(self: madspace._madspace_py.FunctionGenerator, name: str, arg_types: madspace._madspace_py.NamedTypes, return_types: madspace._madspace_py.NamedTypes)¶
Bases:
pybind11_objectBase class for compute-graph functions that are not invertible mappings.
A
FunctionGeneratorbuilds aFunctionfrom named Arguments to named Returns. Unlike Mapping it has no inverse and produces no Jacobian weight. It is used for the pieces of the integrand that only need to be evaluated in one direction: cuts, observables, histograms, matrix elements, PDF and scale evaluation, and the trainable networks. Concrete subclasses list their arguments and returns individually. Subclasses may be written in Python by deriving from this class.References
[1] T. Heimel, O. Mattelaer, R. Winterhalder, “MadSpace”, https://arxiv.org/abs/2602.06895
- Parameters:
name – Identifier used for the generated compute graph.
arg_types – Types of the values consumed by the function.
return_types – Types of the values produced by the function.
- build_function(*args, **kwargs)¶
Overloaded function.
build_function(self: madspace._madspace_py.FunctionGenerator, builder: madspace._madspace_py.FunctionBuilder, args: collections.abc.Sequence[madspace._madspace_py.Value]) -> madspace._madspace_py.NamedValues
Add the function to
fband return its named results.The positional overload attaches names from
arg_types().build_function(self: madspace._madspace_py.FunctionGenerator, builder: madspace._madspace_py.FunctionBuilder, args: madspace._madspace_py.NamedValues) -> madspace._madspace_py.NamedValues
Add the function to
fband return its named results.The positional overload attaches names from
arg_types().
- function(self: madspace._madspace_py.FunctionGenerator) madspace._madspace_py.Function¶
Build a standalone
Function.
- release_inputs()¶