VegasMapping¶
-
class VegasMapping : public madspace::Mapping¶
VEGAS adaptive-sampling mapping.
A separable piecewise-linear reparametrization of the unit hypercube, one axis-aligned grid of
bin_countbins per dimension, adapted to the integrand during a warm-up run [1, 2]. The grid is a compute-graph global named afterprefix; callinitialize_globals(context)once before use.batchis the leading batch dimension.Inputs
latent–float, shape(batch, dimension)– uniform coordinates in[0, 1).
Conditions
None.
Outputs
data–float, shape(batch, dimension)– the reparametrized coordinates.
In addition every mapping returns a
weight(float, shape(batch,)), the Jacobian of the transformation.References
[1] T. Heimel, O. Mattelaer, R. Winterhalder, “MadSpace”, https://arxiv.org/abs/2602.06895 (Sec. 3.2.2)
[2] G. P. Lepage, “Adaptive multidimensional integration: VEGAS enhanced”, https://arxiv.org/abs/2009.05112
Public Functions
-
VegasMapping(std::size_t dimension, std::size_t bin_count, const std::string &prefix = "")¶
- Parameters:
dimension – Number of dimensions.
bin_count – Number of grid bins per dimension.
prefix – Prefix for the grid global name.
-
inline const std::string &grid_name() const¶
Global name of the VEGAS grid.
-
void initialize_globals(ContextPtr context) const¶
Register the grid global on
context.
-
inline std::size_t dimension() const¶
Number of dimensions.
-
inline std::size_t bin_count() const¶
Number of grid bins per dimension.